diff --git a/.chloggen/add-signaltometrics-connector.yaml b/.chloggen/add-signaltometrics-connector.yaml new file mode 100644 index 000000000000..2cd05341aa91 --- /dev/null +++ b/.chloggen/add-signaltometrics-connector.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: new_component + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: signaltometricsconnector + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: New component for generating metrics from raw signals using user defined OTTL expressions. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [35930] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [user] diff --git a/.chloggen/add_cgroupruntime_extension.yaml b/.chloggen/add_cgroupruntime_extension.yaml new file mode 100644 index 000000000000..9563d7a5a5ee --- /dev/null +++ b/.chloggen/add_cgroupruntime_extension.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: new_component + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: extension/cgroupruntime + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Initial implementation for cgroupruntime extension. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [30289] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/.chloggen/awsemfexporter-enhancements.yaml b/.chloggen/awsemfexporter-enhancements.yaml new file mode 100644 index 000000000000..06b631ee6be7 --- /dev/null +++ b/.chloggen/awsemfexporter-enhancements.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: awsemfexporter + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Improvement unit conversion during EMF log translation" + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [35937] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/.chloggen/azuremonitor-bug-fix.yaml b/.chloggen/azuremonitor-bug-fix.yaml new file mode 100644 index 000000000000..3c7546682371 --- /dev/null +++ b/.chloggen/azuremonitor-bug-fix.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: 'bug_fix' + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: azuremonitorexporter + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Fixes an issue where the Azure Monitor exporter was not sending data to App Insights due to the Telemetry Channel not being flushed." + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [35037] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/.chloggen/chan-tim_autoDiscovery.yaml b/.chloggen/chan-tim_autoDiscovery.yaml new file mode 100644 index 000000000000..36ef5884fa18 --- /dev/null +++ b/.chloggen/chan-tim_autoDiscovery.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: sumologicexporter + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: adding new products for auto discovery + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [35622] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/.chloggen/dd-config-api.yaml b/.chloggen/dd-config-api.yaml new file mode 100644 index 000000000000..653aceee4b9e --- /dev/null +++ b/.chloggen/dd-config-api.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: pkg/datadog + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: "Refactor the API that provides metrics translator" + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [36474] + +# (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: "This is API change only and does not affect end users" + +# 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/.chloggen/elasticsearchexporter_sync-bulk-indexer-flush-bytes.yaml b/.chloggen/elasticsearchexporter_sync-bulk-indexer-flush-bytes.yaml new file mode 100644 index 000000000000..979d80bdfad8 --- /dev/null +++ b/.chloggen/elasticsearchexporter_sync-bulk-indexer-flush-bytes.yaml @@ -0,0 +1,31 @@ +# 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: elasticsearchexporter + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Respect `flush::bytes` in sync bulk indexer, `flush::bytes` measures uncompressed size, change default `batcher::max_size_items` to `0` + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [36163] + +# (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: + Limit the bulk request size to roughly `flush::bytes` for sync bulk indexer. + Sync bulk indexer is used when `batcher::enabled` is either true or false. In order words, sync bulk indexer is not used when batcher config is undefined. + Change `flush::bytes` to always measure in uncompressed bytes. + Change default `batcher::max_size_items` to `0` as bulk request size limit is now more effectively enforced by `flush::bytes`. + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [user] diff --git a/.chloggen/fix-k8s-image-parsing.yaml b/.chloggen/fix-k8s-image-parsing.yaml new file mode 100644 index 000000000000..4d21584120ea --- /dev/null +++ b/.chloggen/fix-k8s-image-parsing.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: processor/k8sattribute + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: fixes parsing of k8s image names to support images with tags and digests. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [36131] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [user] diff --git a/.chloggen/fix_clickhouse-exporter-log-service-name.yaml b/.chloggen/fix_clickhouse-exporter-log-service-name.yaml new file mode 100644 index 000000000000..9ee63c3a6bc3 --- /dev/null +++ b/.chloggen/fix_clickhouse-exporter-log-service-name.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: clickhouseexporter + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Fix incorrect Resource Attribute `service.name` translation to ClickHouse ServiceName field for Logs Records + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [36349] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/.chloggen/fix_timestamp.yaml b/.chloggen/fix_timestamp.yaml new file mode 100644 index 000000000000..b7e96e3d663e --- /dev/null +++ b/.chloggen/fix_timestamp.yaml @@ -0,0 +1,25 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: awsfirehosereceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: fix timestamp when ingesting logs from CloudWatch through firehose + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [36122] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [user] \ No newline at end of file diff --git a/.chloggen/huaweicloudces.yaml b/.chloggen/huaweicloudces.yaml new file mode 100644 index 000000000000..2d744a66a8ad --- /dev/null +++ b/.chloggen/huaweicloudces.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: new_component + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: huaweicloudcesreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Introduce new receiver fetching data from huawei Cloud Eye Service. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [34953] + +# (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: [] \ No newline at end of file diff --git a/.chloggen/netflow-receiver.yaml b/.chloggen/netflow-receiver.yaml new file mode 100644 index 000000000000..38b65810b3d2 --- /dev/null +++ b/.chloggen/netflow-receiver.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: new_component + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: netflowreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Introduce the netflow receiver + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [32732] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [user] diff --git a/.chloggen/ottl-improve-telemetry.yaml b/.chloggen/ottl-improve-telemetry.yaml new file mode 100644 index 000000000000..ce3b070712ae --- /dev/null +++ b/.chloggen/ottl-improve-telemetry.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: pkg/ottl + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Move debug log to `Statement.Execute` so that components using it instead of `StatementSequence` also get debug logs. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [36456] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/.chloggen/signalfx-contract.yaml b/.chloggen/signalfx-contract.yaml new file mode 100644 index 000000000000..665f8750bcde --- /dev/null +++ b/.chloggen/signalfx-contract.yaml @@ -0,0 +1,24 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)component: awsfirehosereceiver +component: signalfxreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Follow receiver contract based on type of error +# One or more tracking issues or pull requests related to the change +issues: [5909] + +# (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: Use 503 error code for retryable and 400 error code for not-retryable errors instead of responding with a 500 unconditionally. + +# 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: [] \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c7b9e6740253..b9f0a07b24aa 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -26,7 +26,7 @@ confmap/provider/s3provider/ @open-telemetry/collector-cont 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 @dineshg13 @ankitpatel96 +connector/datadogconnector/ @open-telemetry/collector-contrib-approvers @mx-psi @dineshg13 @ankitpatel96 @jade-guiton-dd 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 @@ -34,6 +34,7 @@ connector/otlpjsonconnector/ @open-telemetry/collector-cont connector/roundrobinconnector/ @open-telemetry/collector-contrib-approvers @bogdandrutu connector/routingconnector/ @open-telemetry/collector-contrib-approvers @jpkrohling @mwear connector/servicegraphconnector/ @open-telemetry/collector-contrib-approvers @jpkrohling @mapno @JaredTan95 +connector/signaltometricsconnector/ @open-telemetry/collector-contrib-approvers @ChrsMark @lahsivjar connector/spanmetricsconnector/ @open-telemetry/collector-contrib-approvers @portertech @Frapschen connector/sumconnector/ @open-telemetry/collector-contrib-approvers @greatestusername @shalper2 @crobert-1 @@ -52,7 +53,7 @@ exporter/carbonexporter/ @open-telemetry/collector-cont 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 @ankitpatel96 +exporter/datadogexporter/ @open-telemetry/collector-contrib-approvers @mx-psi @dineshg13 @liustanley @songy23 @mackjmr @ankitpatel96 @jade-guiton-dd exporter/datasetexporter/ @open-telemetry/collector-contrib-approvers @atoulme @martin-majlis-s1 @zdaratom-s1 @tomaz-s1 exporter/dorisexporter/ @open-telemetry/collector-contrib-approvers @atoulme @joker-star-l exporter/elasticsearchexporter/ @open-telemetry/collector-contrib-approvers @JaredTan95 @carsonip @lahsivjar @@ -71,8 +72,8 @@ exporter/lokiexporter/ @open-telemetry/collector-cont exporter/mezmoexporter/ @open-telemetry/collector-contrib-approvers @dashpole @billmeyer @gjanco exporter/opencensusexporter/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers exporter/otelarrowexporter/ @open-telemetry/collector-contrib-approvers @jmacd @moh-osman3 @lquerel -exporter/prometheusexporter/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @dashpole -exporter/prometheusremotewriteexporter/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @rapphil @dashpole +exporter/prometheusexporter/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @dashpole @ArthurSens +exporter/prometheusremotewriteexporter/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @rapphil @dashpole @ArthurSens exporter/pulsarexporter/ @open-telemetry/collector-contrib-approvers @dmitryax @dao-jun exporter/rabbitmqexporter/ @open-telemetry/collector-contrib-approvers @swar8080 @atoulme exporter/sapmexporter/ @open-telemetry/collector-contrib-approvers @dmitryax @atoulme @@ -89,6 +90,7 @@ extension/asapauthextension/ @open-telemetry/collector-cont 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/cgroupruntimeextension/ @open-telemetry/collector-contrib-approvers @mx-psi @rogercoll 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 @@ -144,7 +146,7 @@ internal/tools/ @open-telemetry/collector-cont pkg/batchperresourceattr/ @open-telemetry/collector-contrib-approvers @atoulme @dmitryax pkg/batchpersignal/ @open-telemetry/collector-contrib-approvers @jpkrohling -pkg/datadog/ @open-telemetry/collector-contrib-approvers @mx-psi @dineshg13 @liustanley @songy23 @mackjmr @ankitpatel96 +pkg/datadog/ @open-telemetry/collector-contrib-approvers @mx-psi @dineshg13 @liustanley @songy23 @mackjmr @ankitpatel96 @jade-guiton-dd pkg/experimentalmetricmetadata/ @open-telemetry/collector-contrib-approvers @dmitryax pkg/golden/ @open-telemetry/collector-contrib-approvers @djaglowski @atoulme pkg/kafka/topic/ @open-telemetry/collector-contrib-approvers @pavolloffay @MovieStoreGuy @@ -161,7 +163,7 @@ pkg/translator/azurelogs/ @open-telemetry/collector-cont 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/prometheus/ @open-telemetry/collector-contrib-approvers @dashpole @bertysentry @ArthurSens pkg/translator/prometheusremotewrite/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @dashpole pkg/translator/signalfx/ @open-telemetry/collector-contrib-approvers @dmitryax pkg/translator/skywalking/ @open-telemetry/collector-contrib-approvers @JaredTan95 @@ -231,6 +233,7 @@ receiver/googlecloudspannerreceiver/ @open-telemetry/collector-cont 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/huaweicloudcesreceiver/ @open-telemetry/collector-contrib-approvers @narcis96 receiver/iisreceiver/ @open-telemetry/collector-contrib-approvers @Mrod1598 @pjanotti receiver/influxdbreceiver/ @open-telemetry/collector-contrib-approvers @jacobmarble receiver/jaegerreceiver/ @open-telemetry/collector-contrib-approvers @yurishkuro @@ -247,6 +250,7 @@ receiver/mongodbatlasreceiver/ @open-telemetry/collector-cont 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/netflowreceiver/ @open-telemetry/collector-contrib-approvers @evan-bradley @dlopes7 receiver/nginxreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski receiver/nsxtreceiver/ @open-telemetry/collector-contrib-approvers @dashpole @schmikei receiver/ntpreceiver/ @open-telemetry/collector-contrib-approvers @atoulme diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index ae072a77e5a1..40374a31674d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -35,6 +35,7 @@ body: - connector/roundrobin - connector/routing - connector/servicegraph + - connector/signaltometrics - connector/spanmetrics - connector/sum - examples/demo @@ -88,6 +89,7 @@ body: - extension/awsproxy - extension/basicauth - extension/bearertokenauth + - extension/cgroupruntime - extension/encoding - extension/encoding/avrologencoding - extension/encoding/jaegerencoding @@ -227,6 +229,7 @@ body: - receiver/haproxy - receiver/hostmetrics - receiver/httpcheck + - receiver/huaweicloudces - receiver/iis - receiver/influxdb - receiver/jaeger @@ -244,6 +247,7 @@ body: - receiver/mongodbatlas - receiver/mysql - receiver/namedpipe + - receiver/netflow - receiver/nginx - receiver/nsxt - receiver/ntp diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index 88d834ed4c69..aeee888ecb63 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -29,6 +29,7 @@ body: - connector/roundrobin - connector/routing - connector/servicegraph + - connector/signaltometrics - connector/spanmetrics - connector/sum - examples/demo @@ -82,6 +83,7 @@ body: - extension/awsproxy - extension/basicauth - extension/bearertokenauth + - extension/cgroupruntime - extension/encoding - extension/encoding/avrologencoding - extension/encoding/jaegerencoding @@ -221,6 +223,7 @@ body: - receiver/haproxy - receiver/hostmetrics - receiver/httpcheck + - receiver/huaweicloudces - receiver/iis - receiver/influxdb - receiver/jaeger @@ -238,6 +241,7 @@ body: - receiver/mongodbatlas - receiver/mysql - receiver/namedpipe + - receiver/netflow - receiver/nginx - receiver/nsxt - receiver/ntp diff --git a/.github/ISSUE_TEMPLATE/other.yaml b/.github/ISSUE_TEMPLATE/other.yaml index 9ea88909bf95..30152c26e1a0 100644 --- a/.github/ISSUE_TEMPLATE/other.yaml +++ b/.github/ISSUE_TEMPLATE/other.yaml @@ -29,6 +29,7 @@ body: - connector/roundrobin - connector/routing - connector/servicegraph + - connector/signaltometrics - connector/spanmetrics - connector/sum - examples/demo @@ -82,6 +83,7 @@ body: - extension/awsproxy - extension/basicauth - extension/bearertokenauth + - extension/cgroupruntime - extension/encoding - extension/encoding/avrologencoding - extension/encoding/jaegerencoding @@ -221,6 +223,7 @@ body: - receiver/haproxy - receiver/hostmetrics - receiver/httpcheck + - receiver/huaweicloudces - receiver/iis - receiver/influxdb - receiver/jaeger @@ -238,6 +241,7 @@ body: - receiver/mongodbatlas - receiver/mysql - receiver/namedpipe + - receiver/netflow - receiver/nginx - receiver/nsxt - receiver/ntp diff --git a/.github/ISSUE_TEMPLATE/unmaintained.yaml b/.github/ISSUE_TEMPLATE/unmaintained.yaml index b8c0263ef714..ab44912d5fe3 100644 --- a/.github/ISSUE_TEMPLATE/unmaintained.yaml +++ b/.github/ISSUE_TEMPLATE/unmaintained.yaml @@ -34,6 +34,7 @@ body: - connector/roundrobin - connector/routing - connector/servicegraph + - connector/signaltometrics - connector/spanmetrics - connector/sum - examples/demo @@ -87,6 +88,7 @@ body: - extension/awsproxy - extension/basicauth - extension/bearertokenauth + - extension/cgroupruntime - extension/encoding - extension/encoding/avrologencoding - extension/encoding/jaegerencoding @@ -226,6 +228,7 @@ body: - receiver/haproxy - receiver/hostmetrics - receiver/httpcheck + - receiver/huaweicloudces - receiver/iis - receiver/influxdb - receiver/jaeger @@ -243,6 +246,7 @@ body: - receiver/mongodbatlas - receiver/mysql - receiver/namedpipe + - receiver/netflow - receiver/nginx - receiver/nsxt - receiver/ntp diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 6893ed44c37b..858868bd789c 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -337,7 +337,7 @@ jobs: merge-multiple: true pattern: coverage-artifacts-* - name: Upload coverage report - uses: codecov/codecov-action@05f5a9cfad807516dbbef9929c4a42df3eb78766 # 5.0.3 + uses: codecov/codecov-action@015f24e6818733317a2da2edd6290ab26238649a # 5.0.7 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.golangci.yml b/.golangci.yml index 17af8cbdc905..83f780bdc864 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -150,7 +150,7 @@ linters: - exhaustive - gci - gocritic - - gofmt + - gofumpt - goimports - gosec - govet diff --git a/Makefile.Common b/Makefile.Common index 07ce7e0d9062..c5459458f79f 100644 --- a/Makefile.Common +++ b/Makefile.Common @@ -72,6 +72,7 @@ CHECKFILE := $(TOOLS_BIN_DIR)/checkfile CROSSLINK := $(TOOLS_BIN_DIR)/crosslink GOJUNIT := $(TOOLS_BIN_DIR)/go-junit-report BUILDER := $(TOOLS_BIN_DIR)/builder +GOFUMPT := $(TOOLS_BIN_DIR)/gofumpt GOVULNCHECK := $(TOOLS_BIN_DIR)/govulncheck GCI := $(TOOLS_BIN_DIR)/gci GOTESTSUM := $(TOOLS_BIN_DIR)/gotestsum @@ -207,8 +208,8 @@ checklinks: $(MDLINKCHECK) -q -c $(SRC_ROOT)/.github/workflows/check_links_config.json || true .PHONY: fmt -fmt: $(GOIMPORTS) - gofmt -w -s ./ +fmt: $(GOFUMPT) $(GOIMPORTS) + $(GOFUMPT) -l -w . $(GOIMPORTS) -w -local github.com/open-telemetry/opentelemetry-collector-contrib ./ .PHONY: lint diff --git a/cmd/githubgen/allowlist.txt b/cmd/githubgen/allowlist.txt index f365aa1f6151..69136f05ea7f 100644 --- a/cmd/githubgen/allowlist.txt +++ b/cmd/githubgen/allowlist.txt @@ -19,4 +19,5 @@ Hemansh31 shazlehu dsimil KiranmayiB -harishbohara11 \ No newline at end of file +harishbohara11 +dlopes7 \ No newline at end of file diff --git a/cmd/githubgen/codeowners.go b/cmd/githubgen/codeowners.go index e33ce9d65efd..9fea2c3bba1b 100644 --- a/cmd/githubgen/codeowners.go +++ b/cmd/githubgen/codeowners.go @@ -179,11 +179,11 @@ LOOP: 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) + err = os.WriteFile(filepath.Join(".github", "CODEOWNERS"), []byte(codeowners+unmaintainedCodeowners), 0o600) if err != nil { return err } - err = os.WriteFile(filepath.Join(".github", "ALLOWLIST"), []byte(allowlistHeader+deprecatedList+unmaintainedList), 0600) + err = os.WriteFile(filepath.Join(".github", "ALLOWLIST"), []byte(allowlistHeader+deprecatedList+unmaintainedList), 0o600) if err != nil { return err } diff --git a/cmd/githubgen/distributions.go b/cmd/githubgen/distributions.go index c5629430b731..95b3588ceb90 100644 --- a/cmd/githubgen/distributions.go +++ b/cmd/githubgen/distributions.go @@ -12,8 +12,7 @@ import ( "gopkg.in/yaml.v3" ) -type distributionsGenerator struct { -} +type distributionsGenerator struct{} type distOutput struct { Name string `yaml:"name"` @@ -54,7 +53,7 @@ func (cg distributionsGenerator) generate(data *githubData) error { if err != nil { return nil } - err = os.WriteFile(filepath.Join("reports", "distributions", fmt.Sprintf("%s.yaml", dist.Name)), b, 0600) + err = os.WriteFile(filepath.Join("reports", "distributions", fmt.Sprintf("%s.yaml", dist.Name)), b, 0o600) if err != nil { return nil } diff --git a/cmd/githubgen/issuetemplates.go b/cmd/githubgen/issuetemplates.go index 84804f9c184b..bce61cf19ef4 100644 --- a/cmd/githubgen/issuetemplates.go +++ b/cmd/githubgen/issuetemplates.go @@ -31,8 +31,7 @@ func folderToShortName(folder string) string { return strings.Join(path, "/") } -type issueTemplatesGenerator struct { -} +type issueTemplatesGenerator struct{} func (itg issueTemplatesGenerator) generate(data *githubData) error { keys := map[string]struct{}{} @@ -59,7 +58,7 @@ func (itg issueTemplatesGenerator) generate(data *githubData) error { 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) + err = os.WriteFile(filepath.Join(issuesFolder, e.Name()), templateContents, 0o600) if err != nil { return err } diff --git a/cmd/opampsupervisor/e2e_test.go b/cmd/opampsupervisor/e2e_test.go index 8e106b2b65f6..56f0b8cae361 100644 --- a/cmd/opampsupervisor/e2e_test.go +++ b/cmd/opampsupervisor/e2e_test.go @@ -284,7 +284,7 @@ func TestSupervisorStartsCollectorWithNoOpAMPServer(t *testing.T) { marshalledRemoteConfig, err := proto.Marshal(remoteConfigProto) require.NoError(t, err) - require.NoError(t, os.WriteFile(remoteConfigFilePath, marshalledRemoteConfig, 0600)) + require.NoError(t, os.WriteFile(remoteConfigFilePath, marshalledRemoteConfig, 0o600)) connected := atomic.Bool{} server := newUnstartedOpAMPServer(t, defaultConnectingHandler, server.ConnectionCallbacksStruct{ @@ -407,7 +407,6 @@ func TestSupervisorStartsWithNoOpAMPServer(t *testing.T) { return n != 0 }, 10*time.Second, 500*time.Millisecond, "Log never appeared in output") - } func TestSupervisorRestartsCollectorAfterBadConfig(t *testing.T) { @@ -1077,7 +1076,6 @@ func TestSupervisorRestartsWithLastReceivedConfig(t *testing.T) { return strings.Contains(loadedConfig, "filelog") }, 10*time.Second, 500*time.Millisecond, "Collector was not started with the last received remote config") - } func TestSupervisorPersistsInstanceID(t *testing.T) { @@ -1091,7 +1089,6 @@ func TestSupervisorPersistsInstanceID(t *testing.T) { defaultConnectingHandler, server.ConnectionCallbacksStruct{ OnMessageFunc: func(_ context.Context, _ types.Connection, message *protobufs.AgentToServer) *protobufs.ServerToAgent { - select { case agentIDChan <- message.InstanceUid: default: @@ -1168,7 +1165,6 @@ func TestSupervisorPersistsNewInstanceID(t *testing.T) { defaultConnectingHandler, server.ConnectionCallbacksStruct{ OnMessageFunc: func(_ context.Context, _ types.Connection, message *protobufs.AgentToServer) *protobufs.ServerToAgent { - select { case agentIDChan <- message.InstanceUid: default: @@ -1359,7 +1355,6 @@ func TestSupervisorStopsAgentProcessWithEmptyConfigMap(t *testing.T) { } else { require.ErrorContains(t, err, "No connection could be made") } - } type LogEntry struct { @@ -1387,7 +1382,7 @@ func TestSupervisorLogging(t *testing.T) { } marshalledRemoteCfg, err := proto.Marshal(remoteCfgProto) require.NoError(t, err) - require.NoError(t, os.WriteFile(remoteCfgFilePath, marshalledRemoteCfg, 0600)) + require.NoError(t, os.WriteFile(remoteCfgFilePath, marshalledRemoteCfg, 0o600)) connected := atomic.Bool{} server := newUnstartedOpAMPServer(t, defaultConnectingHandler, server.ConnectionCallbacksStruct{ @@ -1635,7 +1630,6 @@ func TestSupervisorOpAmpServerPort(t *testing.T) { func findRandomPort() (int, error) { l, err := net.Listen("tcp", "localhost:0") - if err != nil { return 0, err } @@ -1643,7 +1637,6 @@ func findRandomPort() (int, error) { port := l.Addr().(*net.TCPAddr).Port err = l.Close() - if err != nil { return 0, err } diff --git a/cmd/opampsupervisor/go.mod b/cmd/opampsupervisor/go.mod index 3ad15a864b84..9e990ce8661a 100644 --- a/cmd/opampsupervisor/go.mod +++ b/cmd/opampsupervisor/go.mod @@ -11,7 +11,7 @@ require ( github.com/knadh/koanf/providers/rawbytes v0.1.0 github.com/knadh/koanf/v2 v2.1.2 github.com/open-telemetry/opamp-go v0.17.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/config/configopaque v1.20.0 go.opentelemetry.io/collector/config/configtls v1.20.0 go.opentelemetry.io/collector/semconv v0.114.0 diff --git a/cmd/opampsupervisor/go.sum b/cmd/opampsupervisor/go.sum index 57c5de96c291..c2e5c69c70d0 100644 --- a/cmd/opampsupervisor/go.sum +++ b/cmd/opampsupervisor/go.sum @@ -36,8 +36,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI 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/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= go.opentelemetry.io/collector/config/configopaque v1.20.0 h1:2I48zKiyyyYqjm7y0B9OLp24ku2ZSX3nCHG0r5FdWOQ= go.opentelemetry.io/collector/config/configopaque v1.20.0/go.mod h1:6zlLIyOoRpJJ+0bEKrlZOZon3rOp5Jrz9fMdR4twOS4= go.opentelemetry.io/collector/config/configtls v1.20.0 h1:hNlJdwfyY5Qe54RLJ41lfLqKTn9ypkR7sk7JNCcSe2U= diff --git a/cmd/opampsupervisor/supervisor/config/config_test.go b/cmd/opampsupervisor/supervisor/config/config_test.go index 83e44b7b7a32..eec6148311a0 100644 --- a/cmd/opampsupervisor/supervisor/config/config_test.go +++ b/cmd/opampsupervisor/supervisor/config/config_test.go @@ -425,7 +425,7 @@ func TestValidate(t *testing.T) { tmpDir := t.TempDir() filePath := filepath.Join(tmpDir, "file") - require.NoError(t, os.WriteFile(filePath, []byte{}, 0600)) + require.NoError(t, os.WriteFile(filePath, []byte{}, 0o600)) for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { diff --git a/cmd/opampsupervisor/supervisor/persistence.go b/cmd/opampsupervisor/supervisor/persistence.go index fe4df9f48f77..40f80091b1c7 100644 --- a/cmd/opampsupervisor/supervisor/persistence.go +++ b/cmd/opampsupervisor/supervisor/persistence.go @@ -31,7 +31,7 @@ func (p *persistentState) writeState() error { return err } - return os.WriteFile(p.configPath, by, 0600) + return os.WriteFile(p.configPath, by, 0o600) } // loadOrCreatePersistentState attempts to load the persistent state from disk. If it doesn't diff --git a/cmd/opampsupervisor/supervisor/persistence_test.go b/cmd/opampsupervisor/supervisor/persistence_test.go index 68e24f647251..054221b1f5c3 100644 --- a/cmd/opampsupervisor/supervisor/persistence_test.go +++ b/cmd/opampsupervisor/supervisor/persistence_test.go @@ -26,7 +26,7 @@ func TestCreateOrLoadPersistentState(t *testing.T) { t.Run("loads state from file if it exists", func(t *testing.T) { f := filepath.Join(t.TempDir(), "state.yaml") - err := os.WriteFile(f, []byte(`instance_id: "018feed6-905b-7aa6-ba37-b0eec565de03"`), 0600) + err := os.WriteFile(f, []byte(`instance_id: "018feed6-905b-7aa6-ba37-b0eec565de03"`), 0o600) require.NoError(t, err) state, err := loadOrCreatePersistentState(f) diff --git a/cmd/opampsupervisor/supervisor/supervisor.go b/cmd/opampsupervisor/supervisor/supervisor.go index 7e85d44bd055..ca336b756ed0 100644 --- a/cmd/opampsupervisor/supervisor/supervisor.go +++ b/cmd/opampsupervisor/supervisor/supervisor.go @@ -180,7 +180,7 @@ func NewSupervisor(logger *zap.Logger, cfg config.Supervisor) (*Supervisor, erro } s.config = cfg - if err := os.MkdirAll(s.config.Storage.Directory, 0700); err != nil { + if err := os.MkdirAll(s.config.Storage.Directory, 0o700); err != nil { return nil, fmt.Errorf("error creating storage dir: %w", err) } @@ -203,7 +203,6 @@ func (s *Supervisor) Start() error { healthCheckPort := s.config.Agent.HealthCheckPort if healthCheckPort == 0 { healthCheckPort, err = s.findRandomPort() - if err != nil { return fmt.Errorf("could not find port for health check: %w", err) } @@ -285,7 +284,7 @@ func (s *Supervisor) getBootstrapInfo() (err error) { return err } - err = os.WriteFile(s.agentConfigFilePath(), bootstrapConfig, 0600) + err = os.WriteFile(s.agentConfigFilePath(), bootstrapConfig, 0o600) if err != nil { return fmt.Errorf("failed to write agent config: %w", err) } @@ -708,7 +707,7 @@ func (s *Supervisor) composeNoopPipeline() ([]byte, error) { } func (s *Supervisor) composeNoopConfig() ([]byte, error) { - var k = koanf.New("::") + k := koanf.New("::") cfg, err := s.composeNoopPipeline() if err != nil { @@ -821,7 +820,7 @@ func (s *Supervisor) loadAndWriteInitialMergedConfig() error { // write the initial merged config to disk cfgState := s.cfgState.Load().(*configState) - if err := os.WriteFile(s.agentConfigFilePath(), []byte(cfgState.mergedConfig), 0600); err != nil { + if err := os.WriteFile(s.agentConfigFilePath(), []byte(cfgState.mergedConfig), 0o600); err != nil { s.logger.Error("Failed to write agent config.", zap.Error(err)) } @@ -861,7 +860,6 @@ func (s *Supervisor) setupOwnMetrics(_ context.Context, settings *protobufs.Tele s.logger.Debug("Enabling own metrics pipeline in the config") port, err := s.findRandomPort() - if err != nil { s.logger.Error("Could not setup own metrics", zap.Error(err)) return @@ -896,7 +894,7 @@ func (s *Supervisor) setupOwnMetrics(_ context.Context, settings *protobufs.Tele // 2) the own metrics config section // 3) the local override config that is hard-coded in the Supervisor. func (s *Supervisor) composeMergedConfig(config *protobufs.AgentRemoteConfig) (configChanged bool, err error) { - var k = koanf.New("::") + k := koanf.New("::") configMapIsEmpty := len(config.GetConfig().GetConfigMap()) == 0 @@ -924,7 +922,7 @@ func (s *Supervisor) composeMergedConfig(config *protobufs.AgentRemoteConfig) (c if item == nil { continue } - var k2 = koanf.New("::") + k2 := koanf.New("::") err = k2.Load(rawbytes.Provider(item.Body), yaml.Parser()) if err != nil { return false, fmt.Errorf("cannot parse config named %s: %w", name, err) @@ -1010,7 +1008,6 @@ func (s *Supervisor) startAgent() { if err != nil { s.logger.Error("Cannot start the agent", zap.Error(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)) } @@ -1128,7 +1125,6 @@ func (s *Supervisor) runAgentProcess() { s.commander.Pid(), s.commander.ExitCode(), ) 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)) } @@ -1173,12 +1169,11 @@ func (s *Supervisor) stopAgentApplyConfig() { s.logger.Debug("Stopping the agent to apply new config") cfgState := s.cfgState.Load().(*configState) err := s.commander.Stop(context.Background()) - if err != nil { s.logger.Error("Could not stop agent process", zap.Error(err)) } - if err := os.WriteFile(s.agentConfigFilePath(), []byte(cfgState.mergedConfig), 0600); err != nil { + if err := os.WriteFile(s.agentConfigFilePath(), []byte(cfgState.mergedConfig), 0o600); err != nil { s.logger.Error("Failed to write agent config.", zap.Error(err)) } } @@ -1210,13 +1205,11 @@ func (s *Supervisor) Shutdown() { Healthy: false, LastError: "Supervisor is shutdown", }, ) - if err != nil { s.logger.Error("Could not report health to OpAMP server", zap.Error(err)) } err = s.stopOpAMPClient() - if err != nil { s.logger.Error("Could not stop the OpAMP client", zap.Error(err)) } @@ -1233,7 +1226,7 @@ func (s *Supervisor) saveLastReceivedConfig(config *protobufs.AgentRemoteConfig) return err } - return os.WriteFile(filepath.Join(s.config.Storage.Directory, lastRecvRemoteConfigFile), cfg, 0600) + return os.WriteFile(filepath.Join(s.config.Storage.Directory, lastRecvRemoteConfigFile), cfg, 0o600) } func (s *Supervisor) saveLastReceivedOwnTelemetrySettings(set *protobufs.TelemetryConnectionSettings, filePath string) error { @@ -1242,7 +1235,7 @@ func (s *Supervisor) saveLastReceivedOwnTelemetrySettings(set *protobufs.Telemet return err } - return os.WriteFile(filepath.Join(s.config.Storage.Directory, filePath), cfg, 0600) + return os.WriteFile(filepath.Join(s.config.Storage.Directory, filePath), cfg, 0o600) } func (s *Supervisor) reportConfigStatus(status protobufs.RemoteConfigStatuses, errorMessage string) { @@ -1392,7 +1385,6 @@ func (s *Supervisor) getSupervisorOpAMPServerPort() (int, error) { func (s *Supervisor) findRandomPort() (int, error) { l, err := net.Listen("tcp", "localhost:0") - if err != nil { return 0, err } @@ -1400,7 +1392,6 @@ func (s *Supervisor) findRandomPort() (int, error) { port := l.Addr().(*net.TCPAddr).Port err = l.Close() - if err != nil { return 0, err } diff --git a/cmd/opampsupervisor/supervisor/supervisor_test.go b/cmd/opampsupervisor/supervisor/supervisor_test.go index 0af07bc06ffe..3a034bad4113 100644 --- a/cmd/opampsupervisor/supervisor/supervisor_test.go +++ b/cmd/opampsupervisor/supervisor/supervisor_test.go @@ -1042,12 +1042,14 @@ type mockConn struct { func (mockConn) Connection() net.Conn { return nil } + func (m mockConn) Send(ctx context.Context, message *protobufs.ServerToAgent) error { if m.sendFunc != nil { return m.sendFunc(ctx, message) } return nil } + func (mockConn) Disconnect() error { return nil } @@ -1273,8 +1275,8 @@ service: marshalledOwnMetricsCfg, err := proto.Marshal(ownMetricsCfg) require.NoError(t, err) - require.NoError(t, os.WriteFile(filepath.Join(configDir, lastRecvRemoteConfigFile), marshalledRemoteCfg, 0600)) - require.NoError(t, os.WriteFile(filepath.Join(configDir, lastRecvOwnMetricsConfigFile), marshalledOwnMetricsCfg, 0600)) + require.NoError(t, os.WriteFile(filepath.Join(configDir, lastRecvRemoteConfigFile), marshalledRemoteCfg, 0o600)) + require.NoError(t, os.WriteFile(filepath.Join(configDir, lastRecvOwnMetricsConfigFile), marshalledOwnMetricsCfg, 0o600)) s := Supervisor{ logger: zap.NewNop(), diff --git a/cmd/telemetrygen/go.mod b/cmd/telemetrygen/go.mod index fc6341dccd3d..09fdf86c3780 100644 --- a/cmd/telemetrygen/go.mod +++ b/cmd/telemetrygen/go.mod @@ -6,7 +6,7 @@ require ( github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/pdata v1.20.0 go.opentelemetry.io/collector/semconv v0.114.0 diff --git a/cmd/telemetrygen/go.sum b/cmd/telemetrygen/go.sum index 0243ca5ddde7..82f0ab389cf2 100644 --- a/cmd/telemetrygen/go.sum +++ b/cmd/telemetrygen/go.sum @@ -79,8 +79,8 @@ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/cmd/telemetrygen/internal/e2etest/go.mod b/cmd/telemetrygen/internal/e2etest/go.mod index e5b1747a5143..ae0ca0064470 100644 --- a/cmd/telemetrygen/internal/e2etest/go.mod +++ b/cmd/telemetrygen/internal/e2etest/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/consumer/consumertest v0.114.0 go.opentelemetry.io/collector/receiver/otlpreceiver v0.114.0 diff --git a/cmd/telemetrygen/internal/e2etest/go.sum b/cmd/telemetrygen/internal/e2etest/go.sum index b75c7f799a64..66d7a195b86c 100644 --- a/cmd/telemetrygen/internal/e2etest/go.sum +++ b/cmd/telemetrygen/internal/e2etest/go.sum @@ -101,8 +101,8 @@ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:XLLLOHns06P9XjVHyp0OdEMdwXvol5MLzugqQMmXYuU= diff --git a/cmd/telemetrygen/internal/traces/exporter_test.go b/cmd/telemetrygen/internal/traces/exporter_test.go index b8af7442c836..36313c20b576 100644 --- a/cmd/telemetrygen/internal/traces/exporter_test.go +++ b/cmd/telemetrygen/internal/traces/exporter_test.go @@ -68,7 +68,7 @@ func TestHTTPExporterOptions_TLS(t *testing.T) { err := os.WriteFile(caFile, pem.EncodeToMemory(&pem.Block{ Type: "CERTIFICATE", Bytes: srv.TLS.Certificates[0].Certificate[0], - }), 0600) + }), 0o600) require.NoError(t, err) cfg.CaFile = caFile } diff --git a/confmap/provider/aesprovider/go.mod b/confmap/provider/aesprovider/go.mod index 5777d27e11a1..b0d371c4c3c0 100644 --- a/confmap/provider/aesprovider/go.mod +++ b/confmap/provider/aesprovider/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provide go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/confmap v1.20.0 go.uber.org/zap v1.27.0 diff --git a/confmap/provider/aesprovider/go.sum b/confmap/provider/aesprovider/go.sum index f16eed9e249b..802c3d8c7c11 100644 --- a/confmap/provider/aesprovider/go.sum +++ b/confmap/provider/aesprovider/go.sum @@ -20,8 +20,8 @@ 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/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= go.opentelemetry.io/collector/confmap v1.20.0 h1:ARfOwmkKxFOud1njl03yAHQ30+uenlzqCO6LBYamDTE= go.opentelemetry.io/collector/confmap v1.20.0/go.mod h1:DMpd9Ay/ffls3JoQBQ73vWeRsz1rNuLbwjo6WtjSQus= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= diff --git a/confmap/provider/s3provider/go.mod b/confmap/provider/s3provider/go.mod index 66cea61cb778..e3a64d767f79 100644 --- a/confmap/provider/s3provider/go.mod +++ b/confmap/provider/s3provider/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go-v2 v1.32.5 github.com/aws/aws-sdk-go-v2/config v1.28.5 github.com/aws/aws-sdk-go-v2/service/s3 v1.67.1 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/confmap v1.20.0 go.uber.org/goleak v1.3.0 gopkg.in/yaml.v2 v2.4.0 diff --git a/confmap/provider/s3provider/go.sum b/confmap/provider/s3provider/go.sum index 5ca3e735631a..9ef25b2cb7b7 100644 --- a/confmap/provider/s3provider/go.sum +++ b/confmap/provider/s3provider/go.sum @@ -56,8 +56,8 @@ 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/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= go.opentelemetry.io/collector/confmap v1.20.0 h1:ARfOwmkKxFOud1njl03yAHQ30+uenlzqCO6LBYamDTE= go.opentelemetry.io/collector/confmap v1.20.0/go.mod h1:DMpd9Ay/ffls3JoQBQ73vWeRsz1rNuLbwjo6WtjSQus= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= diff --git a/confmap/provider/secretsmanagerprovider/go.mod b/confmap/provider/secretsmanagerprovider/go.mod index 461de3509d22..582faececf37 100644 --- a/confmap/provider/secretsmanagerprovider/go.mod +++ b/confmap/provider/secretsmanagerprovider/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/aws/aws-sdk-go-v2/config v1.28.5 github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.34.6 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/confmap v1.20.0 ) diff --git a/confmap/provider/secretsmanagerprovider/go.sum b/confmap/provider/secretsmanagerprovider/go.sum index a49a2a8258f6..d33eae58091f 100644 --- a/confmap/provider/secretsmanagerprovider/go.sum +++ b/confmap/provider/secretsmanagerprovider/go.sum @@ -260,8 +260,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/confmap/provider/secretsmanagerprovider/provider.go b/confmap/provider/secretsmanagerprovider/provider.go index 2f3ebc4f2d7b..50c8fef263de 100644 --- a/confmap/provider/secretsmanagerprovider/provider.go +++ b/confmap/provider/secretsmanagerprovider/provider.go @@ -57,7 +57,6 @@ func (provider *provider) Retrieve(ctx context.Context, uri string, _ confmap.Wa // initialize the secrets manager client in the first call of Retrieve if provider.client == nil { cfg, err := config.LoadDefaultConfig(ctx) - if err != nil { return nil, fmt.Errorf("failed to load configurations to initialize an AWS SDK client, error: %w", err) } diff --git a/confmap/provider/secretsmanagerprovider/provider_test.go b/confmap/provider/secretsmanagerprovider/provider_test.go index 96df923d6340..6f604f96ec8a 100644 --- a/confmap/provider/secretsmanagerprovider/provider_test.go +++ b/confmap/provider/secretsmanagerprovider/provider_test.go @@ -21,7 +21,8 @@ type testSecretManagerClient struct { // Implement GetSecretValue() func (client *testSecretManagerClient) GetSecretValue(_ context.Context, _ *secretsmanager.GetSecretValueInput, - _ ...func(*secretsmanager.Options)) (*secretsmanager.GetSecretValueOutput, error) { + _ ...func(*secretsmanager.Options), +) (*secretsmanager.GetSecretValueOutput, error) { return &secretsmanager.GetSecretValueOutput{SecretString: &client.secretValue}, nil } diff --git a/connector/countconnector/go.mod b/connector/countconnector/go.mod index d9a29fbf76a4..0f99bdba1b21 100644 --- a/connector/countconnector/go.mod +++ b/connector/countconnector/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/connector/countconnector/go.sum b/connector/countconnector/go.sum index 38684d7adbe7..469a84da2107 100644 --- a/connector/countconnector/go.sum +++ b/connector/countconnector/go.sum @@ -76,8 +76,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 h1:SIKIoA4e/5Y9ZOl0DCe3eVMLPOQzJxgZpfdHHeauNTM= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6/go.mod h1:BUbeWZiieNxAuuADTBNb3/aeje6on3DhU3rpWsQSB1E= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/connector/datadogconnector/README.md b/connector/datadogconnector/README.md index 8623aa9942b7..a80b0c33eb91 100644 --- a/connector/datadogconnector/README.md +++ b/connector/datadogconnector/README.md @@ -5,7 +5,7 @@ | ------------- |-----------| | 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), [@dineshg13](https://www.github.com/dineshg13), [@ankitpatel96](https://www.github.com/ankitpatel96) | +| [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), [@ankitpatel96](https://www.github.com/ankitpatel96), [@jade-guiton-dd](https://www.github.com/jade-guiton-dd) | | Emeritus | [@gbbr](https://www.github.com/gbbr) | [beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta diff --git a/connector/datadogconnector/go.mod b/connector/datadogconnector/go.mod index caa9039cddd8..f2d6ebfcdbf2 100644 --- a/connector/datadogconnector/go.mod +++ b/connector/datadogconnector/go.mod @@ -15,7 +15,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.114.0 github.com/patrickmn/go-cache v2.1.0+incompatible - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 @@ -310,9 +310,9 @@ require ( 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.31.2 // indirect - k8s.io/apimachinery v0.31.2 // indirect - k8s.io/client-go v0.31.2 // indirect + k8s.io/api v0.31.3 // indirect + k8s.io/apimachinery v0.31.3 // indirect + k8s.io/client-go v0.31.3 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect diff --git a/connector/datadogconnector/go.sum b/connector/datadogconnector/go.sum index d0b92fd28192..ce8aaec4c19f 100644 --- a/connector/datadogconnector/go.sum +++ b/connector/datadogconnector/go.sum @@ -810,8 +810,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tinylib/msgp v1.1.9 h1:SHf3yoO2sGA0veCJeCBYLHuttAVFHGm2RHgNodW7wQU= github.com/tinylib/msgp v1.1.9/go.mod h1:BCXGB54lDD8qUEPmiG0cQQUANC4IUQyB2ItS2UDlO/k= @@ -1376,14 +1376,14 @@ 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.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= -k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= -k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= -k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= 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= diff --git a/connector/datadogconnector/metadata.yaml b/connector/datadogconnector/metadata.yaml index 4195117dd967..42aeeee24f4e 100644 --- a/connector/datadogconnector/metadata.yaml +++ b/connector/datadogconnector/metadata.yaml @@ -6,7 +6,7 @@ status: beta: [traces_to_metrics, traces_to_traces] distributions: [contrib] codeowners: - active: [mx-psi, dineshg13, ankitpatel96] + active: [mx-psi, dineshg13, ankitpatel96, jade-guiton-dd] emeritus: [gbbr] tests: diff --git a/connector/exceptionsconnector/go.mod b/connector/exceptionsconnector/go.mod index 8b02f3a948d6..bc4342b7658f 100644 --- a/connector/exceptionsconnector/go.mod +++ b/connector/exceptionsconnector/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/connector/exceptionsconnector/go.sum b/connector/exceptionsconnector/go.sum index 8ed224a7af72..193c74268f8d 100644 --- a/connector/exceptionsconnector/go.sum +++ b/connector/exceptionsconnector/go.sum @@ -46,8 +46,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/connector/failoverconnector/go.mod b/connector/failoverconnector/go.mod index 892309ddabc8..a7c696f4e4bc 100644 --- a/connector/failoverconnector/go.mod +++ b/connector/failoverconnector/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/connector/failo go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/connector/failoverconnector/go.sum b/connector/failoverconnector/go.sum index 2fcec4626bca..faab8b7e90a2 100644 --- a/connector/failoverconnector/go.sum +++ b/connector/failoverconnector/go.sum @@ -46,8 +46,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/connector/grafanacloudconnector/go.mod b/connector/grafanacloudconnector/go.mod index 3071c1318892..a5fd49337475 100644 --- a/connector/grafanacloudconnector/go.mod +++ b/connector/grafanacloudconnector/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/connector/grafa go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configtelemetry v0.114.0 diff --git a/connector/grafanacloudconnector/go.sum b/connector/grafanacloudconnector/go.sum index 447668438a60..c75951c79bcb 100644 --- a/connector/grafanacloudconnector/go.sum +++ b/connector/grafanacloudconnector/go.sum @@ -46,8 +46,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/connector/otlpjsonconnector/go.mod b/connector/otlpjsonconnector/go.mod index c5c026fc8f01..ffebe4f5c405 100644 --- a/connector/otlpjsonconnector/go.mod +++ b/connector/otlpjsonconnector/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/connector/otlpjsonconnector/go.sum b/connector/otlpjsonconnector/go.sum index 8bb07861f7f9..251f43cf7565 100644 --- a/connector/otlpjsonconnector/go.sum +++ b/connector/otlpjsonconnector/go.sum @@ -46,8 +46,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/connector/roundrobinconnector/go.mod b/connector/roundrobinconnector/go.mod index a0018ea26d34..788c94a3cc18 100644 --- a/connector/roundrobinconnector/go.mod +++ b/connector/roundrobinconnector/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/connector/round go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/connector/roundrobinconnector/go.sum b/connector/roundrobinconnector/go.sum index c183a1b5db9e..1db6cebe12b5 100644 --- a/connector/roundrobinconnector/go.sum +++ b/connector/roundrobinconnector/go.sum @@ -44,8 +44,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/connector/routingconnector/go.mod b/connector/routingconnector/go.mod index 884bfb8f627e..8183a16d3cd8 100644 --- a/connector/routingconnector/go.mod +++ b/connector/routingconnector/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/client v1.20.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/connector/routingconnector/go.sum b/connector/routingconnector/go.sum index aede90bdf5d9..5397a51cad80 100644 --- a/connector/routingconnector/go.sum +++ b/connector/routingconnector/go.sum @@ -76,8 +76,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 h1:SIKIoA4e/5Y9ZOl0DCe3eVMLPOQzJxgZpfdHHeauNTM= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6/go.mod h1:BUbeWZiieNxAuuADTBNb3/aeje6on3DhU3rpWsQSB1E= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/connector/servicegraphconnector/go.mod b/connector/servicegraphconnector/go.mod index 361e8bc3df35..08dacd14b7ee 100644 --- a/connector/servicegraphconnector/go.mod +++ b/connector/servicegraphconnector/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configtelemetry v0.114.0 diff --git a/connector/servicegraphconnector/go.sum b/connector/servicegraphconnector/go.sum index a5d0278f86c4..f02746786e51 100644 --- a/connector/servicegraphconnector/go.sum +++ b/connector/servicegraphconnector/go.sum @@ -97,8 +97,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/connector/signaltometricsconnector/Makefile b/connector/signaltometricsconnector/Makefile new file mode 100644 index 000000000000..ded7a36092dc --- /dev/null +++ b/connector/signaltometricsconnector/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/connector/signaltometricsconnector/README.md b/connector/signaltometricsconnector/README.md new file mode 100644 index 000000000000..9e0851209780 --- /dev/null +++ b/connector/signaltometricsconnector/README.md @@ -0,0 +1,227 @@ +# Signal to metrics connector + +Signal to metrics connector produces metrics from all signal types (traces, +logs, or metrics). + + +| Status | | +| ------------- |-----------| +| Distributions | [] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aconnector%2Fsignaltometrics%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aconnector%2Fsignaltometrics) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aconnector%2Fsignaltometrics%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aconnector%2Fsignaltometrics) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@ChrsMark](https://www.github.com/ChrsMark), [@lahsivjar](https://www.github.com/lahsivjar) | + +[development]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#development + +## Supported Pipeline Types + +| [Exporter Pipeline Type] | [Receiver Pipeline Type] | [Stability Level] | +| ------------------------ | ------------------------ | ----------------- | +| traces | metrics | [development] | +| logs | metrics | [development] | +| metrics | metrics | [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/blob/main/docs/component-stability.md#stability-levels + + +## Configuration + +The component can produce metrics from spans, datapoints (for metrics), and logs. +At least one of the metrics for one signal type MUST be specified correctly for +the component to work. + +All signal types can be configured to produce metrics with the same configuration +structure. For example, the below configuration will produce delta temporality counters +for counting number of events for each of the configured signals: + +```yaml +signaltometrics: + spans: + - name: span.count + description: Count of spans + sum: + value: Int(AbsoluteCount()) # Count of total spans represented by each span + datapoints: + - name: datapoint.count + description: Count of datapoints + sum: + value: "1" # increment by 1 for each datapoint + logs: + - name: logrecord.count + description: Count of log records + sum: + value: "1" # increment by 1 for each log record +``` + +### Metrics types + +`signaltometrics` produces a variety of metric types by utilizing [OTTL](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/pkg/ottl/README.md) +to extract the relevant data for a metric type from the incoming data. The +component can produce the following metric types for each signal types: + +- [Sum](https://opentelemetry.io/docs/specs/otel/metrics/data-model/#sums) +- [Histogram](https://opentelemetry.io/docs/specs/otel/metrics/data-model/#histogram) +- [Exponential Histogram](https://opentelemetry.io/docs/specs/otel/metrics/data-model/#exponentialhistogram) + +The component does NOT perform any stateful or time based aggregations. The metric +types are aggregated for the payload sent in each `Consume*` call. The final metric +is then sent forward in the pipeline. + +#### Sum + +Sum metrics have the following configurations: + +```yaml +sum: + value: +``` + +- [**Required**] `value` represents an OTTL expression to extract a value from the + incoming data. Only OTTL expressions that return a value are accepted. The + returned value determines the value type of the `sum` metric (`int` or `double`). + [OTTL converters](https://pkg.go.dev/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs#readme-converters) + can be used to transform the data. + +#### Histogram + +Histogram metrics have the following configurations: + +```yaml +histogram: + buckets: []float64 + count: + value: +``` + +- [**Optional**] `buckets` represents the buckets to be used for the histogram. + If no buckets are configured then it defaults to: + + ```go + []float64{2, 4, 6, 8, 10, 50, 100, 200, 400, 800, 1000, 1400, 2000, 5000, 10_000, 15_000} + ``` + +- [**Optional**] `count` represents an OTTL expression to extract the count to be + recorded in the histogram from the incoming data. If no expression is provided + then it defaults to the count of the signal i.e. [adjusted count](https://opentelemetry.io/docs/specs/otel/trace/tracestate-probability-sampling-experimental/#adjusted-count) + for spans and count for others. [OTTL converters](https://pkg.go.dev/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs#readme-converters) + can be used to transform the data. +- [**Required**] `value` represents an OTTL expression to extract the value to be + recorded in the histogram from the incoming data. [OTTL converters](https://pkg.go.dev/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs#readme-converters) + can be used to transform the data. + +#### Exponential Histogram + +Exponential histogram metrics have the following configurations: + +```yaml +exponential_histogram: + max_size: + count: + value: +``` + +- [**Optional**] `max_size` represents the maximum number of buckets per positive + or negative number range. Defaults to `160`. +- [**Optional**] `count` represents an OTTL expression to extract the count to be + recorded in the exponential histogram from the incoming data. If no expression + is provided then it defaults to the count of the signal i.e. [adjusted count](https://opentelemetry.io/docs/specs/otel/trace/tracestate-probability-sampling-experimental/#adjusted-count) + for spans and count for others. + [OTTL converters](https://pkg.go.dev/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs#readme-converters) can be used to transform the data. +- [**Required**] `value` represents an OTTL expression to extract the value to be recorded + in the exponential histogram from the incoming data. + [OTTL converters](https://pkg.go.dev/github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs#readme-converters) can be used to transform the data. + +### Attributes + +The component can produce metrics categorized by the attributes (span attributes +for traces, datapoint attributes for datapoints, or log record attributes for logs) +from the incoming data by configuring `attributes` for the configured metrics. + +If no `attributes` are configured then the metrics are produced without any attributes. + +```yaml +attributes: + - key: datapoint.foo + - key: datapoint.bar + default_value: bar +``` + +If attributes are specified then a separate metric will be generated for each unique +set of attribute values. Optionally, a `default_value` can be used to always include +the attribute with the value of the attribute defaulting to the value specified in +`default_value` if the incoming data is missing that attribute. + +### Conditions + +Conditions are an optional list of OTTL conditions that are evaluated on the incoming +data and are ORed together. For example: + +```yaml +signaltometrics: + datapoints: + - name: datapoint.bar.sum + description: Count total number of datapoints as per datapoint.bar attribute + conditions: + - resource.attributes["foo"] != nil + - resource.attributes["bar"] != nil + sum: + value: "1" +``` + +The above configuration will produce sum metrics from datapoints with either `foo` +OR `bar` resource attribute defined. + +Conditions can also be ANDed together, for example: + +```yaml +signaltometrics: + datapoints: + - name: gauge.to.exphistogram + conditions: + - metric.type == 1 AND resource.attributes["resource.foo"] != nil + exponential_histogram: + count: "1" # 1 count for each datapoint + value: Double(value_int) + value_double # handle both int and double +``` + +The above configuration produces exponential histogram from gauge metrics with resource +attributes `resource.foo` set. + +### Customizing resource attributes + +The component allows customizing the resource attributes for the produced metrics +by specifying a list of attributes that should be included in the final metrics. +If no attributes are specified for `include_resource_attributes` then no filtering +is performed i.e. all resource attributes of the incoming data is considered. + +```yaml +include_resource_attributes: + - key: resource.foo # Include resource.foo attribute if present + - key: resource.bar # Always include resource.bar attribute, default to bar + default_value: bar +``` + +With the above configuration the produced metrics would only have the couple of +resource attributes specified in the list: + +- `resource.foo` will be present for the produced metrics if the incoming data also + has the attribute defined. +- `resource.bar` will always be present because of the `default_value`. If the incoming + data does not have a resource attribute with name `resource.bar` then the configured + `default_value` of `bar` will be used. + +### Single writer + +Metrics data streams MUST obey [single-writer](https://opentelemetry.io/docs/specs/otel/metrics/data-model/#single-writer) +principle. However, since `signaltometrics` component produces metrics from all signal +types and also allows customizing the resource attributes, there is a possibility +of violating the single-writer principle. To keep the single-writer principle intact, +the component adds collector instance information as resource attributes. The following +resource attributes are added to each produced metrics: + +```yaml +signaltometrics.service.name: +signaltometrics.service.namespace: +signaltometrics.service.instance.id: +``` diff --git a/connector/signaltometricsconnector/config/config.go b/connector/signaltometricsconnector/config/config.go new file mode 100644 index 000000000000..7a2beb6787c8 --- /dev/null +++ b/connector/signaltometricsconnector/config/config.go @@ -0,0 +1,62 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package config // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/signaltometricsconnector/config" + +import "fmt" + +// Config for the connector. Each configuration field describes the metrics +// to produce from a specific signal. +type Config struct { + Spans []MetricInfo `mapstructure:"spans"` + Datapoints []MetricInfo `mapstructure:"datapoints"` + Logs []MetricInfo `mapstructure:"logs"` +} + +func (c *Config) Validate() error { + if len(c.Spans) == 0 && len(c.Datapoints) == 0 && len(c.Logs) == 0 { + return fmt.Errorf("no configuration provided, at least one should be specified") + } + return nil +} + +// MetricInfo defines the structure of the metric produced by the connector. +type MetricInfo struct { + Name string `mapstructure:"name"` + Description string `mapstructure:"description"` + // Unit, if not-empty, will set the unit associated with the metric. + // See: https://github.com/open-telemetry/opentelemetry-collector/blob/b06236cc794982916cc956f20828b3e18eb33264/pdata/pmetric/generated_metric.go#L72-L81 + Unit string `mapstructure:"unit"` + // IncludeResourceAttributes is a list of resource attributes that + // needs to be included in the generated metric. If no resource + // attribute is included in the list then all attributes are included. + IncludeResourceAttributes []Attribute `mapstructure:"include_resource_attributes"` + Attributes []Attribute `mapstructure:"attributes"` + // Conditions are a set of OTTL condtions which are ORed. Data is + // processed into metrics only if the sequence evaluates to true. + Conditions []string `mapstructure:"conditions"` + Histogram *Histogram `mapstructure:"histogram"` + ExponentialHistogram *ExponentialHistogram `mapstructure:"exponential_histogram"` + Sum *Sum `mapstructure:"sum"` +} + +type Attribute struct { + Key string `mapstructure:"key"` + DefaultValue any `mapstructure:"default_value"` +} + +type Histogram struct { + Buckets []float64 `mapstructure:"buckets"` + Count string `mapstructure:"count"` + Value string `mapstructure:"value"` +} + +type ExponentialHistogram struct { + MaxSize int32 `mapstructure:"max_size"` + Count string `mapstructure:"count"` + Value string `mapstructure:"value"` +} + +type Sum struct { + Value string `mapstructure:"value"` +} diff --git a/connector/signaltometricsconnector/config/config_test.go b/connector/signaltometricsconnector/config/config_test.go new file mode 100644 index 000000000000..a542a189df5e --- /dev/null +++ b/connector/signaltometricsconnector/config/config_test.go @@ -0,0 +1,51 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package config + +import ( + "path/filepath" + "testing" + + "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/signaltometricsconnector/internal/metadata" +) + +func TestConfig(t *testing.T) { + for _, tc := range []struct { + path string // relative to `testdata/configs` directory + expected *Config + errorMsgs []string // all error message are checked + }{ + { + path: "empty", + errorMsgs: []string{"no configuration provided"}, + }, + } { + t.Run(tc.path, func(t *testing.T) { + dir := filepath.Join("..", "testdata", "configs") + cfg := &Config{} + cm, err := confmaptest.LoadConf(filepath.Join(dir, tc.path+".yaml")) + require.NoError(t, err) + + sub, err := cm.Sub(component.NewIDWithName(metadata.Type, "").String()) + require.NoError(t, err) + require.NoError(t, sub.Unmarshal(&cfg)) + + err = component.ValidateConfig(cfg) + if len(tc.errorMsgs) > 0 { + for _, errMsg := range tc.errorMsgs { + assert.ErrorContains(t, err, errMsg) + } + return + } + + assert.NoError(t, err) + assert.Equal(t, tc.expected, cfg) + }) + } +} diff --git a/connector/signaltometricsconnector/connector.go b/connector/signaltometricsconnector/connector.go new file mode 100644 index 000000000000..d6f5f5b8283b --- /dev/null +++ b/connector/signaltometricsconnector/connector.go @@ -0,0 +1,50 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package signaltometricsconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/signaltometricsconnector" + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.uber.org/zap" +) + +type signalToMetrics struct { + next consumer.Metrics + logger *zap.Logger + + component.StartFunc + component.ShutdownFunc +} + +func newSignalToMetrics( + set connector.Settings, + next consumer.Metrics, +) *signalToMetrics { + return &signalToMetrics{ + logger: set.Logger, + next: next, + } +} + +func (sm *signalToMetrics) Capabilities() consumer.Capabilities { + return consumer.Capabilities{MutatesData: false} +} + +func (sm *signalToMetrics) ConsumeTraces(context.Context, ptrace.Traces) error { + return nil +} + +func (sm *signalToMetrics) ConsumeMetrics(context.Context, pmetric.Metrics) error { + return nil +} + +func (sm *signalToMetrics) ConsumeLogs(context.Context, plog.Logs) error { + return nil +} diff --git a/connector/signaltometricsconnector/doc.go b/connector/signaltometricsconnector/doc.go new file mode 100644 index 000000000000..f27f0cda71e8 --- /dev/null +++ b/connector/signaltometricsconnector/doc.go @@ -0,0 +1,7 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml + +// Package signaltometricsconnector provides a stateless connector for generating metrics from raw signals. +package signaltometricsconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/signaltometricsconnector" diff --git a/connector/signaltometricsconnector/factory.go b/connector/signaltometricsconnector/factory.go new file mode 100644 index 000000000000..4bf1fcb8d1a3 --- /dev/null +++ b/connector/signaltometricsconnector/factory.go @@ -0,0 +1,57 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package signaltometricsconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/signaltometricsconnector" + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/consumer" + + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/signaltometricsconnector/config" + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/signaltometricsconnector/internal/metadata" +) + +// NewFactory returns a ConnectorFactory. +func NewFactory() connector.Factory { + return connector.NewFactory( + metadata.Type, + createDefaultConfig, + connector.WithTracesToMetrics(createTracesToMetrics, metadata.TracesToMetricsStability), + connector.WithMetricsToMetrics(createMetricsToMetrics, metadata.MetricsToMetricsStability), + connector.WithLogsToMetrics(createLogsToMetrics, metadata.LogsToMetricsStability), + ) +} + +func createDefaultConfig() component.Config { + return &config.Config{} +} + +func createTracesToMetrics( + _ context.Context, + set connector.Settings, + _ component.Config, + nextConsumer consumer.Metrics, +) (connector.Traces, error) { + return newSignalToMetrics(set, nextConsumer), nil +} + +func createMetricsToMetrics( + _ context.Context, + set connector.Settings, + _ component.Config, + nextConsumer consumer.Metrics, +) (connector.Metrics, error) { + return newSignalToMetrics(set, nextConsumer), nil +} + +func createLogsToMetrics( + _ context.Context, + set connector.Settings, + _ component.Config, + nextConsumer consumer.Metrics, +) (connector.Logs, error) { + return newSignalToMetrics(set, nextConsumer), nil +} diff --git a/connector/signaltometricsconnector/factory_test.go b/connector/signaltometricsconnector/factory_test.go new file mode 100644 index 000000000000..a172f0ac1f28 --- /dev/null +++ b/connector/signaltometricsconnector/factory_test.go @@ -0,0 +1,90 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package signaltometricsconnector + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/connector/connectortest" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/pdata/pmetric" + + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/signaltometricsconnector/internal/metadata" +) + +func TestNewFactoryWithLogs(t *testing.T) { + for _, tc := range []struct { + name string + f func(*testing.T) + }{ + { + name: "factory_type", + f: func(t *testing.T) { + factory := NewFactory() + require.EqualValues(t, metadata.Type, factory.Type()) + }, + }, + { + name: "traces_to_metrics", + f: func(t *testing.T) { + mc, err := consumer.NewMetrics(func(context.Context, pmetric.Metrics) error { + return nil + }) + require.NoError(t, err) + + factory := NewFactory() + c, err := factory.CreateTracesToMetrics( + context.Background(), + connectortest.NewNopSettings(), + factory.CreateDefaultConfig(), + mc, + ) + require.NoError(t, err) + require.NotNil(t, c) + }, + }, + { + name: "logs_to_metrics", + f: func(t *testing.T) { + mc, err := consumer.NewMetrics(func(context.Context, pmetric.Metrics) error { + return nil + }) + require.NoError(t, err) + + factory := NewFactory() + c, err := factory.CreateLogsToMetrics( + context.Background(), + connectortest.NewNopSettings(), + factory.CreateDefaultConfig(), + mc, + ) + require.NoError(t, err) + require.NotNil(t, c) + }, + }, + { + name: "metrics_to_metrics", + f: func(t *testing.T) { + mc, err := consumer.NewMetrics(func(context.Context, pmetric.Metrics) error { + return nil + }) + require.NoError(t, err) + + factory := NewFactory() + c, err := factory.CreateMetricsToMetrics( + context.Background(), + connectortest.NewNopSettings(), + factory.CreateDefaultConfig(), + mc, + ) + require.NoError(t, err) + require.NotNil(t, c) + }, + }, + } { + t.Run(tc.name, tc.f) + } +} diff --git a/connector/signaltometricsconnector/generated_component_test.go b/connector/signaltometricsconnector/generated_component_test.go new file mode 100644 index 000000000000..751f8f306fd9 --- /dev/null +++ b/connector/signaltometricsconnector/generated_component_test.go @@ -0,0 +1,88 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package signaltometricsconnector + +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" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pipeline" +) + +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "signaltometrics", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) +} + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set connector.Settings, cfg component.Config) (component.Component, error) + }{ + + { + name: "logs_to_metrics", + createFn: func(ctx context.Context, set connector.Settings, cfg component.Config) (component.Component, error) { + router := connector.NewMetricsRouter(map[pipeline.ID]consumer.Metrics{pipeline.NewID(pipeline.SignalMetrics): consumertest.NewNop()}) + return factory.CreateLogsToMetrics(ctx, set, cfg, router) + }, + }, + + { + name: "metrics_to_metrics", + createFn: func(ctx context.Context, set connector.Settings, cfg component.Config) (component.Component, error) { + router := connector.NewMetricsRouter(map[pipeline.ID]consumer.Metrics{pipeline.NewID(pipeline.SignalMetrics): consumertest.NewNop()}) + return factory.CreateMetricsToMetrics(ctx, set, cfg, router) + }, + }, + + { + name: "traces_to_metrics", + createFn: func(ctx context.Context, set connector.Settings, cfg component.Config) (component.Component, error) { + router := connector.NewMetricsRouter(map[pipeline.ID]consumer.Metrics{pipeline.NewID(pipeline.SignalMetrics): consumertest.NewNop()}) + return factory.CreateTracesToMetrics(ctx, set, cfg, router) + }, + }, + } + + 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, sub.Unmarshal(&cfg)) + + for _, tt := range tests { + t.Run(tt.name+"-shutdown", func(t *testing.T) { + c, err := tt.createFn(context.Background(), connectortest.NewNopSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(tt.name+"-lifecycle", func(t *testing.T) { + firstConnector, err := tt.createFn(context.Background(), connectortest.NewNopSettings(), 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 := tt.createFn(context.Background(), connectortest.NewNopSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondConnector.Start(context.Background(), host)) + require.NoError(t, secondConnector.Shutdown(context.Background())) + }) + } +} diff --git a/connector/signaltometricsconnector/generated_package_test.go b/connector/signaltometricsconnector/generated_package_test.go new file mode 100644 index 000000000000..beb8cdc87cfa --- /dev/null +++ b/connector/signaltometricsconnector/generated_package_test.go @@ -0,0 +1,13 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package signaltometricsconnector + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/connector/signaltometricsconnector/go.mod b/connector/signaltometricsconnector/go.mod new file mode 100644 index 000000000000..97e189341461 --- /dev/null +++ b/connector/signaltometricsconnector/go.mod @@ -0,0 +1,55 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/connector/signaltometricsconnector + +go 1.22.0 + +require ( + github.com/stretchr/testify v1.10.0 + go.opentelemetry.io/collector/component v0.114.0 + go.opentelemetry.io/collector/component/componenttest v0.114.0 + go.opentelemetry.io/collector/confmap v1.20.0 + go.opentelemetry.io/collector/connector v0.114.0 + go.opentelemetry.io/collector/connector/connectortest v0.114.0 + go.opentelemetry.io/collector/consumer v0.114.0 + go.opentelemetry.io/collector/consumer/consumertest v0.114.0 + go.opentelemetry.io/collector/pdata v1.20.0 + go.opentelemetry.io/collector/pipeline v0.114.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-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.2.1 // indirect + github.com/gogo/protobuf v1.3.2 // 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.2 // 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 + go.opentelemetry.io/collector/config/configtelemetry v0.114.0 // indirect + go.opentelemetry.io/collector/connector/connectorprofiles v0.114.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.114.0 // indirect + go.opentelemetry.io/collector/internal/fanoutconsumer v0.114.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.114.0 // indirect + go.opentelemetry.io/collector/pipeline/pipelineprofiles v0.114.0 // indirect + go.opentelemetry.io/otel v1.32.0 // indirect + go.opentelemetry.io/otel/metric v1.32.0 // indirect + go.opentelemetry.io/otel/sdk v1.32.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.32.0 // indirect + go.opentelemetry.io/otel/trace v1.32.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sys v0.27.0 // indirect + golang.org/x/text v0.18.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd // indirect + google.golang.org/grpc v1.67.1 // indirect + google.golang.org/protobuf v1.35.1 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/connector/signaltometricsconnector/go.sum b/connector/signaltometricsconnector/go.sum new file mode 100644 index 000000000000..1db6cebe12b5 --- /dev/null +++ b/connector/signaltometricsconnector/go.sum @@ -0,0 +1,140 @@ +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.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/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.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= +github.com/go-viper/mapstructure/v2 v2.2.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/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.2 h1:I2rtLRqXRy1p01m/utEtpZSSA6dcJbgGVuE27kW2PzQ= +github.com/knadh/koanf/v2 v2.1.2/go.mod h1:Gphfaen0q1Fc1HTgJgSTC4oRX9R2R5ErYMZJy8fLJBo= +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/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/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.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= +go.opentelemetry.io/collector/component v0.114.0/go.mod h1:MLxtjZ6UVHjDxSdhGLuJfHBHvfl1iT/Y7IaQPD24Eww= +go.opentelemetry.io/collector/component/componenttest v0.114.0 h1:GM4FTTlfeXoVm6sZYBHImwlRN8ayh2oAfUhvaFj7Zo8= +go.opentelemetry.io/collector/component/componenttest v0.114.0/go.mod h1:ZZEJMtbJtoVC/3/9R1HzERq+cYQRxuMFQrPCpfZ4Xos= +go.opentelemetry.io/collector/config/configtelemetry v0.114.0 h1:kjLeyrumge6wsX6ZIkicdNOlBXaEyW2PI2ZdVXz/rzY= +go.opentelemetry.io/collector/config/configtelemetry v0.114.0/go.mod h1:R0MBUxjSMVMIhljuDHWIygzzJWQyZHXXWIgQNxcFwhc= +go.opentelemetry.io/collector/confmap v1.20.0 h1:ARfOwmkKxFOud1njl03yAHQ30+uenlzqCO6LBYamDTE= +go.opentelemetry.io/collector/confmap v1.20.0/go.mod h1:DMpd9Ay/ffls3JoQBQ73vWeRsz1rNuLbwjo6WtjSQus= +go.opentelemetry.io/collector/connector v0.114.0 h1:efGAeTCtg8zp5Hyd7Am8kBUgsSxWEFlFtAu4OX4mcEA= +go.opentelemetry.io/collector/connector v0.114.0/go.mod h1:8DhGgD8RhkF0ooELl4NOPPD/wgHuXHmY7g90RwJ2eNo= +go.opentelemetry.io/collector/connector/connectorprofiles v0.114.0 h1:uVs9gy3UfQBmH0636ouIbGIoWis7zmKN+ny4XOGm36U= +go.opentelemetry.io/collector/connector/connectorprofiles v0.114.0/go.mod h1:X681qFEAsEPMDQ0pMsD/3DqePw58sfLew1QbBKvGnmw= +go.opentelemetry.io/collector/connector/connectortest v0.114.0 h1:Fpy1JHyNOLdVzNcmxUY6Jwxdz6JDcTXL1NCfw8k1AOc= +go.opentelemetry.io/collector/connector/connectortest v0.114.0/go.mod h1:1zaAlODuL9iNyfyjHQeGCpbcaUjf5b68t8LqlwHKBNA= +go.opentelemetry.io/collector/consumer v0.114.0 h1:1zVaHvfIZowGwZRitRBRo3i+RP2StlU+GClYiofSw0Q= +go.opentelemetry.io/collector/consumer v0.114.0/go.mod h1:d+Mrzt9hsH1ub3zmwSlnQVPLeTYir4Mgo7CrWfnncN4= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.114.0 h1:5pXYy3E6UK5Huu3aQbsYL8B6E6MyWx4fvXXDn+oXZaA= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.114.0/go.mod h1:PMq3f54KcJQO4v1tue0QxQScu7REFVADlXxXSAYMiN0= +go.opentelemetry.io/collector/consumer/consumertest v0.114.0 h1:isaTwJK5DOy8Bs7GuLq23ejfgj8gLIo5dOUvkRnLF4g= +go.opentelemetry.io/collector/consumer/consumertest v0.114.0/go.mod h1:GNeLPkfRPdh06n/Rv1UKa/cAtCKjN0a7ADyHjIj4HFE= +go.opentelemetry.io/collector/internal/fanoutconsumer v0.114.0 h1:JM9huYqy5LTzmuxQmbPST3l5Ez5kJNit28c6WFWls34= +go.opentelemetry.io/collector/internal/fanoutconsumer v0.114.0/go.mod h1:V28tDU4Wvf1PfW1Ty/SBL9tpKul2iYGno/HkCWGDrj0= +go.opentelemetry.io/collector/pdata v1.20.0 h1:ePcwt4bdtISP0loHaE+C9xYoU2ZkIvWv89Fob16o9SM= +go.opentelemetry.io/collector/pdata v1.20.0/go.mod h1:Ox1YVLe87cZDB/TL30i4SUz1cA5s6AM6SpFMfY61ICs= +go.opentelemetry.io/collector/pdata/pprofile v0.114.0 h1:pUNfTzsI/JUTiE+DScDM4lsrPoxnVNLI2fbTxR/oapo= +go.opentelemetry.io/collector/pdata/pprofile v0.114.0/go.mod h1:4aNcj6WM1n1uXyFSXlhVs4ibrERgNYsTbzcYI2zGhxA= +go.opentelemetry.io/collector/pdata/testdata v0.114.0 h1:+AzszWSL1i4K6meQ8rU0JDDW55SYCXa6FVqfDixhhTo= +go.opentelemetry.io/collector/pdata/testdata v0.114.0/go.mod h1:bv8XFdCTZxG2MQB5l9dKxSxf5zBrcodwO6JOy1+AxXM= +go.opentelemetry.io/collector/pipeline v0.114.0 h1:v3YOhc5z0tD6QbO5n/pnftpIeroihM2ks9Z2yKPCcwY= +go.opentelemetry.io/collector/pipeline v0.114.0/go.mod h1:4vOvjVsoYTHVGTbfFwqfnQOSV2K3RKUHofh3jNRc2Mg= +go.opentelemetry.io/collector/pipeline/pipelineprofiles v0.114.0 h1:LZgxMQ2zXcz8ILBefhxpZBpn/Rx+TJTncIIQy0LgtgY= +go.opentelemetry.io/collector/pipeline/pipelineprofiles v0.114.0/go.mod h1:bmyqQCJWcA53/GtqZJ2ahwmLdFl6UelFH2nR6OJFqpw= +go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= +go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= +go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= +go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= +go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= +go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= +go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= +go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= +go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= +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.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +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.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.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.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +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-20240822170219-fc7c04adadcd h1:6TEm2ZxXoQmFWFlt1vNxvVOa1Q0dXFQD1m/rYjXmS0E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +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/signaltometricsconnector/internal/metadata/generated_status.go b/connector/signaltometricsconnector/internal/metadata/generated_status.go new file mode 100644 index 000000000000..bb48af2b993f --- /dev/null +++ b/connector/signaltometricsconnector/internal/metadata/generated_status.go @@ -0,0 +1,18 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("signaltometrics") + ScopeName = "github.com/open-telemetry/opentelemetry-collector-contrib/connector/signaltometricsconnector" +) + +const ( + TracesToMetricsStability = component.StabilityLevelDevelopment + LogsToMetricsStability = component.StabilityLevelDevelopment + MetricsToMetricsStability = component.StabilityLevelDevelopment +) diff --git a/connector/signaltometricsconnector/metadata.yaml b/connector/signaltometricsconnector/metadata.yaml new file mode 100644 index 000000000000..e677dde4d8ae --- /dev/null +++ b/connector/signaltometricsconnector/metadata.yaml @@ -0,0 +1,33 @@ +type: signaltometrics + +status: + class: connector + stability: + development: [traces_to_metrics, logs_to_metrics, metrics_to_metrics] + distributions: [] + codeowners: + active: [ChrsMark, lahsivjar] + +tests: + config: + spans: + - name: span.duration.histogram + description: "Span duration as histogram" + unit: us + histogram: + value: Microseconds(end_time - start_time) + - name: span.duration.exponential_histogram + description: "Span duration as exponential histogram" + unit: us + exponential_histogram: + value: Microseconds(end_time - start_time) + logs: + - name: logrecord.count + description: "Count of log record" + sum: + value: "1" # Count each log record as 1, has to be a string + datapoints: + - name: datapoint.count + description: "Count of datapoint" + sum: + value: Int(1) # Count each data point as 1, can also use the Int converter diff --git a/connector/signaltometricsconnector/testdata/configs/empty.yaml b/connector/signaltometricsconnector/testdata/configs/empty.yaml new file mode 100644 index 000000000000..b00cc3dc1131 --- /dev/null +++ b/connector/signaltometricsconnector/testdata/configs/empty.yaml @@ -0,0 +1 @@ +signaltometrics: {} diff --git a/connector/spanmetricsconnector/go.mod b/connector/spanmetricsconnector/go.mod index bae33dbe57ef..6cd1e17c0526 100644 --- a/connector/spanmetricsconnector/go.mod +++ b/connector/spanmetricsconnector/go.mod @@ -9,7 +9,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/connector/spanmetricsconnector/go.sum b/connector/spanmetricsconnector/go.sum index 2d6121538d18..292c67d9c581 100644 --- a/connector/spanmetricsconnector/go.sum +++ b/connector/spanmetricsconnector/go.sum @@ -54,8 +54,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/connector/sumconnector/go.mod b/connector/sumconnector/go.mod index d518d0f0b419..e1faa3f7817d 100644 --- a/connector/sumconnector/go.mod +++ b/connector/sumconnector/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/connector/sumconnector/go.sum b/connector/sumconnector/go.sum index 38684d7adbe7..469a84da2107 100644 --- a/connector/sumconnector/go.sum +++ b/connector/sumconnector/go.sum @@ -76,8 +76,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 h1:SIKIoA4e/5Y9ZOl0DCe3eVMLPOQzJxgZpfdHHeauNTM= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6/go.mod h1:BUbeWZiieNxAuuADTBNb3/aeje6on3DhU3rpWsQSB1E= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/exporter/alertmanagerexporter/alertmanager_exporter.go b/exporter/alertmanagerexporter/alertmanager_exporter.go index 250fc5877147..58a8ba393c73 100644 --- a/exporter/alertmanagerexporter/alertmanager_exporter.go +++ b/exporter/alertmanagerexporter/alertmanager_exporter.go @@ -167,7 +167,6 @@ func (s *alertmanagerExporter) pushTraces(ctx context.Context, td ptrace.Traces) alert := s.convertEventsToAlertPayload(events) err := s.postAlert(ctx, alert) - if err != nil { return err } diff --git a/exporter/alertmanagerexporter/config_test.go b/exporter/alertmanagerexporter/config_test.go index e884e0c17755..07802fbc3e5a 100644 --- a/exporter/alertmanagerexporter/config_test.go +++ b/exporter/alertmanagerexporter/config_test.go @@ -37,7 +37,6 @@ func TestLoadConfig(t *testing.T) { id component.ID expected component.Config }{ - { id: component.NewIDWithName(metadata.Type, ""), expected: defaultCfg, diff --git a/exporter/alertmanagerexporter/go.mod b/exporter/alertmanagerexporter/go.mod index f5710b5ea269..94707e012f3f 100644 --- a/exporter/alertmanagerexporter/go.mod +++ b/exporter/alertmanagerexporter/go.mod @@ -6,7 +6,7 @@ require ( github.com/cenkalti/backoff/v4 v4.3.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 github.com/prometheus/common v0.60.1 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 diff --git a/exporter/alertmanagerexporter/go.sum b/exporter/alertmanagerexporter/go.sum index beaf6a8a8745..1787cbaced36 100644 --- a/exporter/alertmanagerexporter/go.sum +++ b/exporter/alertmanagerexporter/go.sum @@ -64,8 +64,8 @@ github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/exporter/alibabacloudlogserviceexporter/config_test.go b/exporter/alibabacloudlogserviceexporter/config_test.go index a9ce04f83909..3af84173c7dd 100644 --- a/exporter/alibabacloudlogserviceexporter/config_test.go +++ b/exporter/alibabacloudlogserviceexporter/config_test.go @@ -29,7 +29,6 @@ func TestLoadConfig(t *testing.T) { id component.ID expected component.Config }{ - { id: component.NewIDWithName(metadata.Type, ""), expected: defaultCfg, diff --git a/exporter/alibabacloudlogserviceexporter/go.mod b/exporter/alibabacloudlogserviceexporter/go.mod index c390be891e76..bc8b486c53dc 100644 --- a/exporter/alibabacloudlogserviceexporter/go.mod +++ b/exporter/alibabacloudlogserviceexporter/go.mod @@ -6,7 +6,7 @@ require ( github.com/aliyun/aliyun-log-go-sdk v0.1.83 github.com/gogo/protobuf v1.3.2 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configopaque v1.20.0 diff --git a/exporter/alibabacloudlogserviceexporter/go.sum b/exporter/alibabacloudlogserviceexporter/go.sum index 47d38fb15842..01c9975b5d59 100644 --- a/exporter/alibabacloudlogserviceexporter/go.sum +++ b/exporter/alibabacloudlogserviceexporter/go.sum @@ -93,8 +93,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/exporter/alibabacloudlogserviceexporter/logs_exporter.go b/exporter/alibabacloudlogserviceexporter/logs_exporter.go index e6f9668491b8..33eaf37e5230 100644 --- a/exporter/alibabacloudlogserviceexporter/logs_exporter.go +++ b/exporter/alibabacloudlogserviceexporter/logs_exporter.go @@ -38,7 +38,8 @@ type logServiceLogsSender struct { func (s *logServiceLogsSender) pushLogsData( _ context.Context, - md plog.Logs) error { + md plog.Logs, +) error { var err error slsLogs := logDataToLogService(md) if len(slsLogs) > 0 { diff --git a/exporter/alibabacloudlogserviceexporter/logsdata_to_logservice.go b/exporter/alibabacloudlogserviceexporter/logsdata_to_logservice.go index 29b11ca37457..5fc5058bfc19 100644 --- a/exporter/alibabacloudlogserviceexporter/logsdata_to_logservice.go +++ b/exporter/alibabacloudlogserviceexporter/logsdata_to_logservice.go @@ -115,7 +115,8 @@ func instrumentationScopeToLogContents(instrumentationScope pcommon.Instrumentat func mapLogRecordToLogService(lr plog.LogRecord, resourceContents, - instrumentationLibraryContents []*sls.LogContent) *sls.Log { + instrumentationLibraryContents []*sls.LogContent, +) *sls.Log { if lr.Body().Type() == pcommon.ValueTypeEmpty { return nil } diff --git a/exporter/alibabacloudlogserviceexporter/metricsdata_to_logservice.go b/exporter/alibabacloudlogserviceexporter/metricsdata_to_logservice.go index a9f4c23a1462..c01e83447400 100644 --- a/exporter/alibabacloudlogserviceexporter/metricsdata_to_logservice.go +++ b/exporter/alibabacloudlogserviceexporter/metricsdata_to_logservice.go @@ -113,7 +113,8 @@ func newMetricLogFromRaw( name string, labels KeyValues, nsec int64, - value float64) *sls.Log { + value float64, +) *sls.Log { labels.Sort() return &sls.Log{ Time: proto.Uint32(uint32(nsec / 1e9)), diff --git a/exporter/awscloudwatchlogsexporter/exporter.go b/exporter/awscloudwatchlogsexporter/exporter.go index 03056439b75f..9aa14be1e3de 100644 --- a/exporter/awscloudwatchlogsexporter/exporter.go +++ b/exporter/awscloudwatchlogsexporter/exporter.go @@ -63,7 +63,6 @@ func newCwLogsPusher(expConfig *Config, params exp.Settings) (*cwlExporter, erro // create CWLogs client with aws session config svcStructuredLog := cwlogs.NewClient(params.Logger, awsConfig, params.BuildInfo, expConfig.LogGroupName, expConfig.LogRetention, expConfig.Tags, session, metadata.Type.String()) collectorIdentifier, err := uuid.NewRandom() - if err != nil { return nil, err } @@ -105,13 +104,11 @@ func (e *cwlExporter) consumeLogs(_ context.Context, ld plog.Logs) error { var errs error err := pushLogsToCWLogs(e.logger, ld, e.Config, pusher) - if err != nil { errs = errors.Join(errs, fmt.Errorf("Error pushing logs: %w", err)) } err = pusher.ForceFlush() - if err != nil { errs = errors.Join(errs, fmt.Errorf("Error flushing logs: %w", err)) } diff --git a/exporter/awscloudwatchlogsexporter/go.mod b/exporter/awscloudwatchlogsexporter/go.mod index 0d94e94181f9..374cff2d9f77 100644 --- a/exporter/awscloudwatchlogsexporter/go.mod +++ b/exporter/awscloudwatchlogsexporter/go.mod @@ -8,7 +8,7 @@ require ( github.com/google/uuid v1.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configretry v1.20.0 diff --git a/exporter/awscloudwatchlogsexporter/go.sum b/exporter/awscloudwatchlogsexporter/go.sum index 367b207c66dc..5fe2c346aff4 100644 --- a/exporter/awscloudwatchlogsexporter/go.sum +++ b/exporter/awscloudwatchlogsexporter/go.sum @@ -54,8 +54,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/exporter/awsemfexporter/config.go b/exporter/awsemfexporter/config.go index 969a69e67798..7495277e1c2a 100644 --- a/exporter/awsemfexporter/config.go +++ b/exporter/awsemfexporter/config.go @@ -14,11 +14,9 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry" ) -var ( - // eMFSupportedUnits contains the unit collection supported by CloudWatch backend service. - // https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html - eMFSupportedUnits = newEMFSupportedUnits() -) +// eMFSupportedUnits contains the unit collection supported by CloudWatch backend service. +// https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDatum.html +var eMFSupportedUnits = newEMFSupportedUnits() // Config defines configuration for AWS EMF exporter. type Config struct { @@ -152,11 +150,13 @@ func (config *Config) isAppSignalsEnabled() bool { func newEMFSupportedUnits() map[string]any { unitIndexer := map[string]any{} - for _, unit := range []string{"Seconds", "Microseconds", "Milliseconds", "Bytes", "Kilobytes", "Megabytes", + for _, unit := range []string{ + "Seconds", "Microseconds", "Milliseconds", "Bytes", "Kilobytes", "Megabytes", "Gigabytes", "Terabytes", "Bits", "Kilobits", "Megabits", "Gigabits", "Terabits", "Percent", "Count", "Bytes/Second", "Kilobytes/Second", "Megabytes/Second", "Gigabytes/Second", "Terabytes/Second", "Bits/Second", "Kilobits/Second", - "Megabits/Second", "Gigabits/Second", "Terabits/Second", "Count/Second", "None"} { + "Megabits/Second", "Gigabits/Second", "Terabits/Second", "Count/Second", "None", + } { unitIndexer[unit] = nil } return unitIndexer diff --git a/exporter/awsemfexporter/datapoint_test.go b/exporter/awsemfexporter/datapoint_test.go index 46ba057c036e..911ecc48e24e 100644 --- a/exporter/awsemfexporter/datapoint_test.go +++ b/exporter/awsemfexporter/datapoint_test.go @@ -333,6 +333,7 @@ func generateOtelTestMetrics(generatedOtelMetrics ...pmetric.Metrics) pmetric.Me } return finalOtelMetrics } + func generateDeltaMetricMetadata(adjustToDelta bool, metricName string, retainInitialValueForDelta bool) deltaMetricMetadata { return deltaMetricMetadata{ adjustToDelta: adjustToDelta, diff --git a/exporter/awsemfexporter/emf_exporter.go b/exporter/awsemfexporter/emf_exporter.go index f840900b32d2..34b9eaf76856 100644 --- a/exporter/awsemfexporter/emf_exporter.go +++ b/exporter/awsemfexporter/emf_exporter.go @@ -76,7 +76,6 @@ func newEmfExporter(config *Config, set exporter.Settings) (*emfExporter, error) cwlogs.WithUserAgentExtras(userAgentExtras...), ) collectorIdentifier, err := uuid.NewRandom() - if err != nil { return nil, err } diff --git a/exporter/awsemfexporter/go.mod b/exporter/awsemfexporter/go.mod index 605085d564f2..1247d191beed 100644 --- a/exporter/awsemfexporter/go.mod +++ b/exporter/awsemfexporter/go.mod @@ -10,7 +10,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/exporter/awsemfexporter/go.sum b/exporter/awsemfexporter/go.sum index 7d33ed79014a..d0511203b5fc 100644 --- a/exporter/awsemfexporter/go.sum +++ b/exporter/awsemfexporter/go.sum @@ -56,8 +56,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/exporter/awsemfexporter/grouped_metric.go b/exporter/awsemfexporter/grouped_metric.go index 606be2b3d4aa..5ba39b93f787 100644 --- a/exporter/awsemfexporter/grouped_metric.go +++ b/exporter/awsemfexporter/grouped_metric.go @@ -192,6 +192,11 @@ func translateUnit(metric pmetric.Metric, descriptor map[string]MetricDescriptor } } switch unit { + case "1": + unit = "" + case "ns": + // CloudWatch doesn't support Nanoseconds + unit = "" case "ms": unit = "Milliseconds" case "s": @@ -200,7 +205,7 @@ func translateUnit(metric pmetric.Metric, descriptor map[string]MetricDescriptor unit = "Microseconds" case "By": unit = "Bytes" - case "Bi": + case "bit": unit = "Bits" } return unit diff --git a/exporter/awsemfexporter/grouped_metric_test.go b/exporter/awsemfexporter/grouped_metric_test.go index 3f3503efd387..8688cfaaca03 100644 --- a/exporter/awsemfexporter/grouped_metric_test.go +++ b/exporter/awsemfexporter/grouped_metric_test.go @@ -488,10 +488,12 @@ func TestTranslateUnit(t *testing.T) { translateUnitCases := map[string]string{ "Count": "Count", "ms": "Milliseconds", + "ns": "", + "1": "", "s": "Seconds", "us": "Microseconds", "By": "Bytes", - "Bi": "Bits", + "bit": "Bits", } for input, output := range translateUnitCases { t.Run(input, func(_ *testing.T) { diff --git a/exporter/awsemfexporter/metric_translator.go b/exporter/awsemfexporter/metric_translator.go index 4e6c1d0bf739..bb16a5ea3346 100644 --- a/exporter/awsemfexporter/metric_translator.go +++ b/exporter/awsemfexporter/metric_translator.go @@ -449,7 +449,6 @@ func translateCWMetricToEMF(cWMetric *cWMetrics, config *Config) (*cwlogs.Event, func translateGroupedMetricToEmf(groupedMetric *groupedMetric, config *Config, defaultLogStream string) (*cwlogs.Event, error) { cWMetric := translateGroupedMetricToCWMetric(groupedMetric, config) event, err := translateCWMetricToEMF(cWMetric, config) - if err != nil { return nil, err } diff --git a/exporter/awsemfexporter/metric_translator_test.go b/exporter/awsemfexporter/metric_translator_test.go index e86176fc1fa6..15c74767d7d8 100644 --- a/exporter/awsemfexporter/metric_translator_test.go +++ b/exporter/awsemfexporter/metric_translator_test.go @@ -431,7 +431,6 @@ func TestTranslateCWMetricToEMF(t *testing.T) { for name, tc := range testCases { t.Run(name, func(_ *testing.T) { config := &Config{ - // include valid json string, a non-existing key, and keys whose value are not json/string ParseJSONEncodedAttributeValues: []string{"kubernetes", "Sources", "NonExistingAttributeKey", "spanName", "spanCounter"}, Version: tc.emfVersion, @@ -1335,7 +1334,8 @@ func TestGroupedMetricToCWMeasurementsWithFilters(t *testing.T) { Dimensions: [][]string{{}}, MetricNameSelectors: []string{"metric(1|3)"}, }, - }, []cWMeasurement{ + }, + []cWMeasurement{ { Namespace: namespace, Dimensions: [][]string{{}}, @@ -2194,123 +2194,121 @@ type logGroupStreamTest struct { outLogStreamName string } -var ( - logGroupStreamTestCases = []logGroupStreamTest{ - { - name: "log_group_stream_expect_same", - inputMetrics: generateTestMetrics(testMetric{ - metricNames: []string{"metric_1", "metric_2"}, - metricValues: [][]float64{{100}, {4}}, - }), - inLogGroupName: "test-log-group", - inLogStreamName: "test-log-stream", - outLogGroupName: "test-log-group", - outLogStreamName: "test-log-stream", - }, - { - name: "log_group_pattern_from_resource", - inputMetrics: generateTestMetrics(testMetric{ - metricNames: []string{"metric_1", "metric_2"}, - metricValues: [][]float64{{100}, {4}}, - resourceAttributeMap: map[string]any{ - "ClusterName": "test-cluster", - "PodName": "test-pod", - }, - }), - inLogGroupName: "test-log-group-{ClusterName}", - inLogStreamName: "test-log-stream", - outLogGroupName: "test-log-group-test-cluster", - outLogStreamName: "test-log-stream", - }, - { - name: "log_stream_pattern_from_resource", - inputMetrics: generateTestMetrics(testMetric{ - metricNames: []string{"metric_1", "metric_2"}, - metricValues: [][]float64{{100}, {4}}, - resourceAttributeMap: map[string]any{ - "ClusterName": "test-cluster", - "PodName": "test-pod", - }, - }), - inLogGroupName: "test-log-group", - inLogStreamName: "test-log-stream-{PodName}", - outLogGroupName: "test-log-group", - outLogStreamName: "test-log-stream-test-pod", - }, - { - name: "log_group_pattern_from_label", - inputMetrics: generateTestMetrics(testMetric{ - metricNames: []string{"metric_1", "metric_2"}, - metricValues: [][]float64{{100}, {4}}, - attributeMap: map[string]any{ - "ClusterName": "test-cluster", - "PodName": "test-pod", - }, - }), - inLogGroupName: "test-log-group-{ClusterName}", - inLogStreamName: "test-log-stream", - outLogGroupName: "test-log-group-test-cluster", - outLogStreamName: "test-log-stream", - }, - { - name: "log_stream_pattern_from_label", - inputMetrics: generateTestMetrics(testMetric{ - metricNames: []string{"metric_1", "metric_2"}, - metricValues: [][]float64{{100}, {4}}, - attributeMap: map[string]any{ - "ClusterName": "test-cluster", - "PodName": "test-pod", - }, - }), - inLogGroupName: "test-log-group", - inLogStreamName: "test-log-stream-{PodName}", - outLogGroupName: "test-log-group", - outLogStreamName: "test-log-stream-test-pod", - }, - { - name: "config_pattern_from_both_attributes", - inputMetrics: generateTestMetrics(testMetric{ - metricNames: []string{"metric_1", "metric_2"}, - metricValues: [][]float64{{100}, {4}}, - resourceAttributeMap: map[string]any{ - "ClusterName": "test-cluster", - }, - attributeMap: map[string]any{ - "PodName": "test-pod", - }, - }), - inLogGroupName: "test-log-group-{ClusterName}", - inLogStreamName: "test-log-stream-{PodName}", - outLogGroupName: "test-log-group-test-cluster", - outLogStreamName: "test-log-stream-test-pod", - }, - { - name: "config_pattern_missing_from_both_attributes", - inputMetrics: generateTestMetrics(testMetric{ - metricNames: []string{"metric_1", "metric_2"}, - metricValues: [][]float64{{100}, {4}}, - }), - inLogGroupName: "test-log-group-{ClusterName}", - inLogStreamName: "test-log-stream-{PodName}", - outLogGroupName: "test-log-group-undefined", - outLogStreamName: "test-log-stream-undefined", - }, - { - name: "config_pattern_group_missing_stream_present", - inputMetrics: generateTestMetrics(testMetric{ - metricNames: []string{"metric_1", "metric_2"}, - metricValues: [][]float64{{100}, {4}}, - attributeMap: map[string]any{ - "PodName": "test-pod", - }, - }), - inLogGroupName: "test-log-group-{ClusterName}", - inLogStreamName: "test-log-stream-{PodName}", - outLogGroupName: "test-log-group-undefined", - outLogStreamName: "test-log-stream-test-pod", - }, - } -) +var logGroupStreamTestCases = []logGroupStreamTest{ + { + name: "log_group_stream_expect_same", + inputMetrics: generateTestMetrics(testMetric{ + metricNames: []string{"metric_1", "metric_2"}, + metricValues: [][]float64{{100}, {4}}, + }), + inLogGroupName: "test-log-group", + inLogStreamName: "test-log-stream", + outLogGroupName: "test-log-group", + outLogStreamName: "test-log-stream", + }, + { + name: "log_group_pattern_from_resource", + inputMetrics: generateTestMetrics(testMetric{ + metricNames: []string{"metric_1", "metric_2"}, + metricValues: [][]float64{{100}, {4}}, + resourceAttributeMap: map[string]any{ + "ClusterName": "test-cluster", + "PodName": "test-pod", + }, + }), + inLogGroupName: "test-log-group-{ClusterName}", + inLogStreamName: "test-log-stream", + outLogGroupName: "test-log-group-test-cluster", + outLogStreamName: "test-log-stream", + }, + { + name: "log_stream_pattern_from_resource", + inputMetrics: generateTestMetrics(testMetric{ + metricNames: []string{"metric_1", "metric_2"}, + metricValues: [][]float64{{100}, {4}}, + resourceAttributeMap: map[string]any{ + "ClusterName": "test-cluster", + "PodName": "test-pod", + }, + }), + inLogGroupName: "test-log-group", + inLogStreamName: "test-log-stream-{PodName}", + outLogGroupName: "test-log-group", + outLogStreamName: "test-log-stream-test-pod", + }, + { + name: "log_group_pattern_from_label", + inputMetrics: generateTestMetrics(testMetric{ + metricNames: []string{"metric_1", "metric_2"}, + metricValues: [][]float64{{100}, {4}}, + attributeMap: map[string]any{ + "ClusterName": "test-cluster", + "PodName": "test-pod", + }, + }), + inLogGroupName: "test-log-group-{ClusterName}", + inLogStreamName: "test-log-stream", + outLogGroupName: "test-log-group-test-cluster", + outLogStreamName: "test-log-stream", + }, + { + name: "log_stream_pattern_from_label", + inputMetrics: generateTestMetrics(testMetric{ + metricNames: []string{"metric_1", "metric_2"}, + metricValues: [][]float64{{100}, {4}}, + attributeMap: map[string]any{ + "ClusterName": "test-cluster", + "PodName": "test-pod", + }, + }), + inLogGroupName: "test-log-group", + inLogStreamName: "test-log-stream-{PodName}", + outLogGroupName: "test-log-group", + outLogStreamName: "test-log-stream-test-pod", + }, + { + name: "config_pattern_from_both_attributes", + inputMetrics: generateTestMetrics(testMetric{ + metricNames: []string{"metric_1", "metric_2"}, + metricValues: [][]float64{{100}, {4}}, + resourceAttributeMap: map[string]any{ + "ClusterName": "test-cluster", + }, + attributeMap: map[string]any{ + "PodName": "test-pod", + }, + }), + inLogGroupName: "test-log-group-{ClusterName}", + inLogStreamName: "test-log-stream-{PodName}", + outLogGroupName: "test-log-group-test-cluster", + outLogStreamName: "test-log-stream-test-pod", + }, + { + name: "config_pattern_missing_from_both_attributes", + inputMetrics: generateTestMetrics(testMetric{ + metricNames: []string{"metric_1", "metric_2"}, + metricValues: [][]float64{{100}, {4}}, + }), + inLogGroupName: "test-log-group-{ClusterName}", + inLogStreamName: "test-log-stream-{PodName}", + outLogGroupName: "test-log-group-undefined", + outLogStreamName: "test-log-stream-undefined", + }, + { + name: "config_pattern_group_missing_stream_present", + inputMetrics: generateTestMetrics(testMetric{ + metricNames: []string{"metric_1", "metric_2"}, + metricValues: [][]float64{{100}, {4}}, + attributeMap: map[string]any{ + "PodName": "test-pod", + }, + }), + inLogGroupName: "test-log-group-{ClusterName}", + inLogStreamName: "test-log-stream-{PodName}", + outLogGroupName: "test-log-group-undefined", + outLogStreamName: "test-log-stream-test-pod", + }, +} func TestTranslateOtToGroupedMetricForLogGroupAndStream(t *testing.T) { for _, test := range logGroupStreamTestCases { diff --git a/exporter/awskinesisexporter/exporter.go b/exporter/awskinesisexporter/exporter.go index acf83d831176..762afb09fa57 100644 --- a/exporter/awskinesisexporter/exporter.go +++ b/exporter/awskinesisexporter/exporter.go @@ -95,7 +95,6 @@ func createExporter(ctx context.Context, c component.Config, log *zap.Logger, op batch.WithMaxRecordsPerBatch(conf.MaxRecordsPerBatch), batch.WithCompressionType(conf.Compression), ) - if err != nil { return nil, err } diff --git a/exporter/awskinesisexporter/go.mod b/exporter/awskinesisexporter/go.mod index f77847e16b14..28a156736fea 100644 --- a/exporter/awskinesisexporter/go.mod +++ b/exporter/awskinesisexporter/go.mod @@ -14,7 +14,7 @@ require ( github.com/jaegertracing/jaeger v1.62.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configretry v1.20.0 diff --git a/exporter/awskinesisexporter/go.sum b/exporter/awskinesisexporter/go.sum index 8d3b3813ca79..a210fb77b078 100644 --- a/exporter/awskinesisexporter/go.sum +++ b/exporter/awskinesisexporter/go.sum @@ -88,8 +88,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.111.0 h1:D3LJTYrrK2ac94E2PXPSbVkArqxbklbCLsE4MAJQdRo= diff --git a/exporter/awskinesisexporter/internal/compress/compresser.go b/exporter/awskinesisexporter/internal/compress/compresser.go index fe12413f1f1f..f0de7a766d13 100644 --- a/exporter/awskinesisexporter/internal/compress/compresser.go +++ b/exporter/awskinesisexporter/internal/compress/compresser.go @@ -33,7 +33,6 @@ func flateCompressor(in []byte) ([]byte, error) { w, _ := flate.NewWriter(&buf, flate.BestSpeed) _, err := w.Write(in) - if err != nil { return nil, err } @@ -56,7 +55,6 @@ func gzipCompressor(in []byte) ([]byte, error) { w, _ := gzip.NewWriterLevel(&buf, gzip.BestSpeed) _, err := w.Write(in) - if err != nil { return nil, err } @@ -79,7 +77,6 @@ func zlibCompressor(in []byte) ([]byte, error) { w, _ := zlib.NewWriterLevel(&buf, zlib.BestSpeed) _, err := w.Write(in) - if err != nil { return nil, err } diff --git a/exporter/awskinesisexporter/internal/compress/compresser_test.go b/exporter/awskinesisexporter/internal/compress/compresser_test.go index 44952fb2fb80..082427bb6133 100644 --- a/exporter/awskinesisexporter/internal/compress/compresser_test.go +++ b/exporter/awskinesisexporter/internal/compress/compresser_test.go @@ -172,7 +172,6 @@ func concurrentCompressFunc(t *testing.T) { // any single format would do it here, since each exporter can be set to use only one at a time // and the concurrent issue that was present in the past was independent of the format compressFunc, err := compress.NewCompressor("gzip") - if err != nil { errCh <- err return diff --git a/exporter/awskinesisexporter/internal/producer/batcher.go b/exporter/awskinesisexporter/internal/producer/batcher.go index 2b68e725608b..8e18dc933284 100644 --- a/exporter/awskinesisexporter/internal/producer/batcher.go +++ b/exporter/awskinesisexporter/internal/producer/batcher.go @@ -23,9 +23,7 @@ type batcher struct { log *zap.Logger } -var ( - _ Batcher = (*batcher)(nil) -) +var _ Batcher = (*batcher)(nil) var ( permanentErrResourceNotFound = new(*types.ResourceNotFoundException) @@ -52,7 +50,6 @@ func (b *batcher) Put(ctx context.Context, bt *batch.Batch) error { StreamName: b.stream, Records: records, }) - if err != nil { if errors.As(err, permanentErrResourceNotFound) || errors.As(err, permanentErrInvalidArgument) { err = consumererror.NewPermanent(err) diff --git a/exporter/awskinesisexporter/internal/producer/interface.go b/exporter/awskinesisexporter/internal/producer/interface.go index 0726e7f71cbb..3a3b40f20318 100644 --- a/exporter/awskinesisexporter/internal/producer/interface.go +++ b/exporter/awskinesisexporter/internal/producer/interface.go @@ -29,6 +29,4 @@ type Kinesis interface { PutRecords(ctx context.Context, params *kinesis.PutRecordsInput, optFns ...func(*kinesis.Options)) (*kinesis.PutRecordsOutput, error) } -var ( - _ Kinesis = (*kinesis.Client)(nil) -) +var _ Kinesis = (*kinesis.Client)(nil) diff --git a/exporter/awss3exporter/body_marshaler_test.go b/exporter/awss3exporter/body_marshaler_test.go index 0363e20722a2..0c4846a14b14 100644 --- a/exporter/awss3exporter/body_marshaler_test.go +++ b/exporter/awss3exporter/body_marshaler_test.go @@ -71,7 +71,7 @@ func TestBodyMarshalerWithMapType(t *testing.T) { m.PutDouble("foobardouble", 0.006) m.PutInt("foobarint", 1) - var expect = `{"bar":"bar","foo":"foo","foobar":false,"foobardouble":0.006,"foobarint":1}` + expect := `{"bar":"bar","foo":"foo","foobar":false,"foobardouble":0.006,"foobarint":1}` marshaler := &bodyMarshaler{} require.NotNil(t, marshaler) diff --git a/exporter/awss3exporter/exporter.go b/exporter/awss3exporter/exporter.go index 3a89cf00ee32..b3e84aaa7af8 100644 --- a/exporter/awss3exporter/exporter.go +++ b/exporter/awss3exporter/exporter.go @@ -24,7 +24,8 @@ type s3Exporter struct { } func newS3Exporter(config *Config, - params exporter.Settings) *s3Exporter { + params exporter.Settings, +) *s3Exporter { s3Exporter := &s3Exporter{ config: config, dataWriter: &s3Writer{}, @@ -56,7 +57,6 @@ func (e *s3Exporter) Capabilities() consumer.Capabilities { func (e *s3Exporter) ConsumeMetrics(ctx context.Context, md pmetric.Metrics) error { buf, err := e.marshaler.MarshalMetrics(md) - if err != nil { return err } @@ -66,7 +66,6 @@ func (e *s3Exporter) ConsumeMetrics(ctx context.Context, md pmetric.Metrics) err func (e *s3Exporter) ConsumeLogs(ctx context.Context, logs plog.Logs) error { buf, err := e.marshaler.MarshalLogs(logs) - if err != nil { return err } diff --git a/exporter/awss3exporter/factory.go b/exporter/awss3exporter/factory.go index ee4d3eae72fe..75964280fca7 100644 --- a/exporter/awss3exporter/factory.go +++ b/exporter/awss3exporter/factory.go @@ -37,7 +37,8 @@ func createDefaultConfig() component.Config { func createLogsExporter(ctx context.Context, params exporter.Settings, - config component.Config) (exporter.Logs, error) { + config component.Config, +) (exporter.Logs, error) { s3Exporter := newS3Exporter(config.(*Config), params) return exporterhelper.NewLogs(ctx, params, @@ -48,7 +49,8 @@ func createLogsExporter(ctx context.Context, func createMetricsExporter(ctx context.Context, params exporter.Settings, - config component.Config) (exporter.Metrics, error) { + config component.Config, +) (exporter.Metrics, error) { s3Exporter := newS3Exporter(config.(*Config), params) if config.(*Config).MarshalerName == SumoIC { @@ -63,7 +65,8 @@ func createMetricsExporter(ctx context.Context, func createTracesExporter(ctx context.Context, params exporter.Settings, - config component.Config) (exporter.Traces, error) { + config component.Config, +) (exporter.Traces, error) { s3Exporter := newS3Exporter(config.(*Config), params) if config.(*Config).MarshalerName == SumoIC { diff --git a/exporter/awss3exporter/go.mod b/exporter/awss3exporter/go.mod index 7cf6cf252947..b347916ceb4c 100644 --- a/exporter/awss3exporter/go.mod +++ b/exporter/awss3exporter/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/aws/aws-sdk-go v1.55.5 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configcompression v1.20.0 diff --git a/exporter/awss3exporter/go.sum b/exporter/awss3exporter/go.sum index 11eab256fc65..df46d63fd02c 100644 --- a/exporter/awss3exporter/go.sum +++ b/exporter/awss3exporter/go.sum @@ -103,8 +103,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/exporter/awss3exporter/marshaler.go b/exporter/awss3exporter/marshaler.go index 57ac6455d823..006cdf45c526 100644 --- a/exporter/awss3exporter/marshaler.go +++ b/exporter/awss3exporter/marshaler.go @@ -21,9 +21,7 @@ type marshaler interface { format() string } -var ( - ErrUnknownMarshaler = errors.New("unknown marshaler") -) +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} diff --git a/exporter/awss3exporter/marshaler_test.go b/exporter/awss3exporter/marshaler_test.go index 0f651fa87cc3..c6aaefe51806 100644 --- a/exporter/awss3exporter/marshaler_test.go +++ b/exporter/awss3exporter/marshaler_test.go @@ -56,8 +56,7 @@ func (h hostWithExtensions) GetExtensions() map[component.ID]component.Component } } -type encodingExtension struct { -} +type encodingExtension struct{} func (e encodingExtension) Start(_ context.Context, _ component.Host) error { panic("unsupported") diff --git a/exporter/awss3exporter/s3_writer.go b/exporter/awss3exporter/s3_writer.go index 38376c45605d..13667f38a074 100644 --- a/exporter/awss3exporter/s3_writer.go +++ b/exporter/awss3exporter/s3_writer.go @@ -19,8 +19,7 @@ import ( "go.opentelemetry.io/collector/config/configcompression" ) -type s3Writer struct { -} +type s3Writer struct{} // generate the s3 time key based on partition configuration func getTimeKey(time time.Time, partition string) string { @@ -113,7 +112,6 @@ func (s3writer *s3Writer) writeBuffer(_ context.Context, buf []byte, config *Con sessionConfig := getSessionConfig(config) sess, err := getSession(config, sessionConfig) - if err != nil { return err } diff --git a/exporter/awsxrayexporter/go.mod b/exporter/awsxrayexporter/go.mod index b3e9b19c74b2..3b16eb8cb46c 100644 --- a/exporter/awsxrayexporter/go.mod +++ b/exporter/awsxrayexporter/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/exporter/awsxrayexporter/go.sum b/exporter/awsxrayexporter/go.sum index 2caacd1af5d1..86dc5793ba57 100644 --- a/exporter/awsxrayexporter/go.sum +++ b/exporter/awsxrayexporter/go.sum @@ -56,8 +56,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/exporter/awsxrayexporter/internal/translator/aws.go b/exporter/awsxrayexporter/internal/translator/aws.go index d1db1c57d17f..20002ce3fc0d 100644 --- a/exporter/awsxrayexporter/internal/translator/aws.go +++ b/exporter/awsxrayexporter/internal/translator/aws.go @@ -230,7 +230,7 @@ func makeAws(attributes map[string]pcommon.Value, resource pcommon.Resource, log case logGroups != (pcommon.Slice{}) && logGroups.Len() > 0: cwl = getLogGroupMetadata(logGroups, false) case logGroupNames != nil: - var configSlice = pcommon.NewSlice() + configSlice := pcommon.NewSlice() configSlice.EnsureCapacity(len(logGroupNames)) for _, s := range logGroupNames { diff --git a/exporter/awsxrayexporter/internal/translator/cause.go b/exporter/awsxrayexporter/internal/translator/cause.go index b5a3fd3b85a4..35acc84d4064 100644 --- a/exporter/awsxrayexporter/internal/translator/cause.go +++ b/exporter/awsxrayexporter/internal/translator/cause.go @@ -21,14 +21,17 @@ import ( // ExceptionEventName the name of the exception event. // TODO: Remove this when collector defines this semantic convention. -const ExceptionEventName = "exception" -const AwsIndividualHTTPEventName = "HTTP request failure" -const AwsIndividualHTTPErrorEventType = "aws.http.error.event" -const AwsIndividualHTTPErrorCodeAttr = "http.response.status_code" -const AwsIndividualHTTPErrorMsgAttr = "aws.http.error_message" +const ( + ExceptionEventName = "exception" + AwsIndividualHTTPEventName = "HTTP request failure" + AwsIndividualHTTPErrorEventType = "aws.http.error.event" + AwsIndividualHTTPErrorCodeAttr = "http.response.status_code" + AwsIndividualHTTPErrorMsgAttr = "aws.http.error_message" +) func makeCause(span ptrace.Span, attributes map[string]pcommon.Value, resource pcommon.Resource) (isError, isFault, isThrottle bool, - filtered map[string]pcommon.Value, cause *awsxray.CauseData) { + filtered map[string]pcommon.Value, cause *awsxray.CauseData, +) { status := span.Status() filtered = attributes @@ -112,7 +115,9 @@ func makeCause(span ptrace.Span, attributes map[string]pcommon.Value, resource p cause = &awsxray.CauseData{ Type: awsxray.CauseTypeObject, CauseObject: awsxray.CauseObject{ - Exceptions: exceptions}} + Exceptions: exceptions, + }, + } case status.Code() != ptrace.StatusCodeError: cause = nil diff --git a/exporter/awsxrayexporter/internal/translator/cause_test.go b/exporter/awsxrayexporter/internal/translator/cause_test.go index 48b56aaa33a8..65759105dcaa 100644 --- a/exporter/awsxrayexporter/internal/translator/cause_test.go +++ b/exporter/awsxrayexporter/internal/translator/cause_test.go @@ -94,7 +94,7 @@ func TestMakeCauseAwsSdkSpan(t *testing.T) { } func TestCauseExceptionWithoutError(t *testing.T) { - var nonErrorStatusCodes = []ptrace.StatusCode{ptrace.StatusCodeUnset, ptrace.StatusCodeOk} + nonErrorStatusCodes := []ptrace.StatusCode{ptrace.StatusCodeUnset, ptrace.StatusCodeOk} for _, element := range nonErrorStatusCodes { ExceptionWithoutErrorHelper(t, element) @@ -104,7 +104,7 @@ func TestCauseExceptionWithoutError(t *testing.T) { func ExceptionWithoutErrorHelper(t *testing.T, statusCode ptrace.StatusCode) { errorMsg := "this is a test" - var exceptionStack = `java.lang.IllegalStateException: state is not legal + exceptionStack := `java.lang.IllegalStateException: state is not legal at io.opentelemetry.sdk.trace.RecordEventsReadableSpanTest.recordException(RecordEventsReadableSpanTest.java:626) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) @@ -140,7 +140,7 @@ Caused by: java.lang.IllegalArgumentException: bad argument` } func TestEventWithoutExceptionWithoutError(t *testing.T) { - var nonErrorStatusCodes = []ptrace.StatusCode{ptrace.StatusCodeUnset, ptrace.StatusCodeOk} + nonErrorStatusCodes := []ptrace.StatusCode{ptrace.StatusCodeUnset, ptrace.StatusCodeOk} for _, element := range nonErrorStatusCodes { EventWithoutExceptionWithoutErrorHelper(t, element) diff --git a/exporter/awsxrayexporter/internal/translator/http_test.go b/exporter/awsxrayexporter/internal/translator/http_test.go index 82f678c54171..92fb6b50bc30 100644 --- a/exporter/awsxrayexporter/internal/translator/http_test.go +++ b/exporter/awsxrayexporter/internal/translator/http_test.go @@ -458,6 +458,7 @@ func TestSpanWithClientAddrWithoutNetworkPeerAddr(t *testing.T) { assert.Equal(t, aws.Bool(true), httpData.Request.XForwardedFor) } + func TestSpanWithClientAddrAndNetworkPeerAddr(t *testing.T) { attributes := make(map[string]any) attributes[AttributeURLFull] = "https://api.example.com/users/junit" diff --git a/exporter/awsxrayexporter/internal/translator/segment.go b/exporter/awsxrayexporter/internal/translator/segment.go index 98f6211cd1fd..849416bcd2ef 100644 --- a/exporter/awsxrayexporter/internal/translator/segment.go +++ b/exporter/awsxrayexporter/internal/translator/segment.go @@ -46,21 +46,17 @@ const ( k8sRemoteNamespace = "K8s.RemoteNamespace" ) -var ( - // reInvalidSpanCharacters defines the invalid letters in a span name as per - // Allowed characters for X-Ray Segment Name: - // Unicode letters, numbers, and whitespace, and the following symbols: _, ., :, /, %, &, #, =, +, \, -, @ - // Doc: https://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html - reInvalidSpanCharacters = regexp.MustCompile(`[^ 0-9\p{L}N_.:/%&#=+\-@]`) -) - -var ( - remoteXrayExporterDotConverter = featuregate.GlobalRegistry().MustRegister( - "exporter.xray.allowDot", - featuregate.StageBeta, - featuregate.WithRegisterDescription("X-Ray Exporter will no longer convert . to _ in annotation keys when this feature gate is enabled. "), - featuregate.WithRegisterFromVersion("v0.97.0"), - ) +// reInvalidSpanCharacters defines the invalid letters in a span name as per +// Allowed characters for X-Ray Segment Name: +// Unicode letters, numbers, and whitespace, and the following symbols: _, ., :, /, %, &, #, =, +, \, -, @ +// Doc: https://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html +var reInvalidSpanCharacters = regexp.MustCompile(`[^ 0-9\p{L}N_.:/%&#=+\-@]`) + +var remoteXrayExporterDotConverter = featuregate.GlobalRegistry().MustRegister( + "exporter.xray.allowDot", + featuregate.StageBeta, + 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 ( @@ -90,9 +86,7 @@ var removeAnnotationsFromServiceSegment = []string{ k8sRemoteNamespace, } -var ( - writers = newWriterPool(2048) -) +var writers = newWriterPool(2048) // MakeSegmentDocuments converts spans to json documents func MakeSegmentDocuments(span ptrace.Span, resource pcommon.Resource, indexedAttrs []string, indexAllAttrs bool, logGroupNames []string, skipTimestampValidation bool) ([]string, error) { @@ -143,13 +137,12 @@ func addNamespaceToSubsegmentWithRemoteService(span ptrace.Span, segment *awsxra } func MakeDependencySubsegmentForLocalRootDependencySpan(span ptrace.Span, resource pcommon.Resource, indexedAttrs []string, indexAllAttrs bool, logGroupNames []string, skipTimestampValidation bool, serviceSegmentID pcommon.SpanID) (*awsxray.Segment, error) { - var dependencySpan = ptrace.NewSpan() + dependencySpan := ptrace.NewSpan() span.CopyTo(dependencySpan) dependencySpan.SetParentSpanID(serviceSegmentID) dependencySubsegment, err := MakeSegment(dependencySpan, resource, indexedAttrs, indexAllAttrs, logGroupNames, skipTimestampValidation) - if err != nil { return nil, err } @@ -187,7 +180,6 @@ func MakeServiceSegmentForLocalRootDependencySpan(span ptrace.Span, resource pco } serviceSegment, err := MakeSegment(serviceSpan, resource, indexedAttrs, indexAllAttrs, logGroupNames, skipTimestampValidation) - if err != nil { return nil, err } @@ -234,7 +226,6 @@ func MakeServiceSegmentForLocalRootDependencySpan(span ptrace.Span, resource pco func MakeServiceSegmentForLocalRootSpanWithoutDependency(span ptrace.Span, resource pcommon.Resource, indexedAttrs []string, indexAllAttrs bool, logGroupNames []string, skipTimestampValidation bool) ([]*awsxray.Segment, error) { segment, err := MakeSegment(span, resource, indexedAttrs, indexAllAttrs, logGroupNames, skipTimestampValidation) - if err != nil { return nil, err } @@ -247,7 +238,6 @@ func MakeServiceSegmentForLocalRootSpanWithoutDependency(span ptrace.Span, resou func MakeNonLocalRootSegment(span ptrace.Span, resource pcommon.Resource, indexedAttrs []string, indexAllAttrs bool, logGroupNames []string, skipTimestampValidation bool) ([]*awsxray.Segment, error) { segment, err := MakeSegment(span, resource, indexedAttrs, indexAllAttrs, logGroupNames, skipTimestampValidation) - if err != nil { return nil, err } @@ -259,7 +249,7 @@ func MakeNonLocalRootSegment(span ptrace.Span, resource pcommon.Resource, indexe func MakeServiceSegmentAndDependencySubsegment(span ptrace.Span, resource pcommon.Resource, indexedAttrs []string, indexAllAttrs bool, logGroupNames []string, skipTimestampValidation bool) ([]*awsxray.Segment, error) { // If it is a local root span and a dependency span, we need to make a segment and subsegment representing the local service and remote service, respectively. - var serviceSegmentID = newSegmentID() + serviceSegmentID := newSegmentID() var segments []*awsxray.Segment // Make Dependency Subsegment @@ -296,7 +286,6 @@ func MakeSegmentsFromSpan(span ptrace.Span, resource pcommon.Resource, indexedAt // MakeSegmentDocumentString will be deprecated in the future func MakeSegmentDocumentString(span ptrace.Span, resource pcommon.Resource, indexedAttrs []string, indexAllAttrs bool, logGroupNames []string, skipTimestampValidation bool) (string, error) { segment, err := MakeSegment(span, resource, indexedAttrs, indexAllAttrs, logGroupNames, skipTimestampValidation) - if err != nil { return "", err } @@ -612,7 +601,8 @@ func addSpecialAttributes(attributes map[string]pcommon.Value, indexedAttrs []st } func makeXRayAttributes(attributes map[string]pcommon.Value, resource pcommon.Resource, storeResource bool, indexedAttrs []string, indexAllAttrs bool) ( - string, map[string]any, map[string]map[string]any) { + string, map[string]any, map[string]map[string]any, +) { var ( annotations = map[string]any{} metadata = map[string]map[string]any{} diff --git a/exporter/awsxrayexporter/internal/translator/segment_test.go b/exporter/awsxrayexporter/internal/translator/segment_test.go index 39e17fd972ef..1b057c9ad899 100644 --- a/exporter/awsxrayexporter/internal/translator/segment_test.go +++ b/exporter/awsxrayexporter/internal/translator/segment_test.go @@ -30,9 +30,7 @@ const ( resourceArrayKey = "array.key" ) -var ( - testWriters = newWriterPool(2048) -) +var testWriters = newWriterPool(2048) func TestClientSpanWithRpcAwsSdkClientAttributes(t *testing.T) { spanName := "AmazonDynamoDB.getItem" @@ -1544,7 +1542,7 @@ func validateLocalRootWithoutDependency(t *testing.T, segment *awsxray.Segment, assert.Equal(t, "myRemoteService", segment.Annotations["aws_remote_service"]) assert.Equal(t, "myAnnotationValue", segment.Annotations["myAnnotationKey"]) - var numberOfMetadataKeys = 8 + numberOfMetadataKeys := 8 if span.Kind() == ptrace.SpanKindServer { numberOfMetadataKeys = 30 diff --git a/exporter/awsxrayexporter/internal/translator/span_links.go b/exporter/awsxrayexporter/internal/translator/span_links.go index 7a262b2fa5b1..c7b3df473423 100644 --- a/exporter/awsxrayexporter/internal/translator/span_links.go +++ b/exporter/awsxrayexporter/internal/translator/span_links.go @@ -15,11 +15,10 @@ func makeSpanLinks(links ptrace.SpanLinkSlice, skipTimestampValidation bool) ([] for i := 0; i < links.Len(); i++ { var spanLinkData awsxray.SpanLinkData - var link = links.At(i) + link := links.At(i) - var spanID = link.SpanID().String() + spanID := link.SpanID().String() traceID, err := convertToAmazonTraceID(link.TraceID(), skipTimestampValidation) - if err != nil { return nil, err } diff --git a/exporter/awsxrayexporter/internal/translator/span_links_test.go b/exporter/awsxrayexporter/internal/translator/span_links_test.go index 6c1fb6107bf8..5347c8c15525 100644 --- a/exporter/awsxrayexporter/internal/translator/span_links_test.go +++ b/exporter/awsxrayexporter/internal/translator/span_links_test.go @@ -19,7 +19,7 @@ func TestSpanLinkSimple(t *testing.T) { resource := constructDefaultResource() span := constructServerSpan(parentSpanID, spanName, ptrace.StatusCodeOk, "OK", attributes) - var traceID = newTraceID() + traceID := newTraceID() spanLink := span.Links().AppendEmpty() spanLink.SetTraceID(traceID) @@ -27,7 +27,7 @@ func TestSpanLinkSimple(t *testing.T) { segment, _ := MakeSegment(span, resource, nil, false, nil, false) - var convertedTraceID, _ = convertToAmazonTraceID(traceID, false) + convertedTraceID, _ := convertToAmazonTraceID(traceID, false) assert.Len(t, segment.Links, 1) assert.Equal(t, spanLink.SpanID().String(), *segment.Links[0].SpanID) @@ -68,7 +68,7 @@ func TestOldSpanLinkError(t *testing.T) { const maxAge = 60 * 60 * 24 * 30 ExpiredEpoch := time.Now().Unix() - maxAge - 1 - var traceID = newTraceID() + traceID := newTraceID() binary.BigEndian.PutUint32(traceID[0:4], uint32(ExpiredEpoch)) spanLink := span.Links().AppendEmpty() @@ -91,14 +91,14 @@ func TestTwoSpanLinks(t *testing.T) { resource := constructDefaultResource() span := constructServerSpan(parentSpanID, spanName, ptrace.StatusCodeOk, "OK", attributes) - var traceID1 = newTraceID() + traceID1 := newTraceID() spanLink1 := span.Links().AppendEmpty() spanLink1.SetTraceID(traceID1) spanLink1.SetSpanID(newSegmentID()) spanLink1.Attributes().PutStr("myKey1", "ABC") - var traceID2 = newTraceID() + traceID2 := newTraceID() spanLink2 := span.Links().AppendEmpty() spanLink2.SetTraceID(traceID2) @@ -107,8 +107,8 @@ func TestTwoSpanLinks(t *testing.T) { segment, _ := MakeSegment(span, resource, nil, false, nil, false) - var convertedTraceID1, _ = convertToAmazonTraceID(traceID1, false) - var convertedTraceID2, _ = convertToAmazonTraceID(traceID2, false) + convertedTraceID1, _ := convertToAmazonTraceID(traceID1, false) + convertedTraceID2, _ := convertToAmazonTraceID(traceID2, false) assert.Len(t, segment.Links, 2) assert.Equal(t, spanLink1.SpanID().String(), *segment.Links[0].SpanID) @@ -149,23 +149,23 @@ func TestSpanLinkComplexAttributes(t *testing.T) { spanLink.Attributes().PutInt("myKey3", 112233) spanLink.Attributes().PutDouble("myKey4", 3.1415) - var slice1 = spanLink.Attributes().PutEmptySlice("myKey5") + slice1 := spanLink.Attributes().PutEmptySlice("myKey5") slice1.AppendEmpty().SetStr("apple") slice1.AppendEmpty().SetStr("pear") slice1.AppendEmpty().SetStr("banana") - var slice2 = spanLink.Attributes().PutEmptySlice("myKey6") + slice2 := spanLink.Attributes().PutEmptySlice("myKey6") slice2.AppendEmpty().SetBool(true) slice2.AppendEmpty().SetBool(false) slice2.AppendEmpty().SetBool(false) slice2.AppendEmpty().SetBool(true) - var slice3 = spanLink.Attributes().PutEmptySlice("myKey7") + slice3 := spanLink.Attributes().PutEmptySlice("myKey7") slice3.AppendEmpty().SetInt(1234) slice3.AppendEmpty().SetInt(5678) slice3.AppendEmpty().SetInt(9012) - var slice4 = spanLink.Attributes().PutEmptySlice("myKey8") + slice4 := spanLink.Attributes().PutEmptySlice("myKey8") slice4.AppendEmpty().SetDouble(2.718) slice4.AppendEmpty().SetDouble(1.618) diff --git a/exporter/azuredataexplorerexporter/adx_exporter.go b/exporter/azuredataexplorerexporter/adx_exporter.go index 967c944836fa..b1b76b34e056 100644 --- a/exporter/azuredataexplorerexporter/adx_exporter.go +++ b/exporter/azuredataexplorerexporter/adx_exporter.go @@ -150,7 +150,6 @@ func newExporter(config *Config, logger *zap.Logger, telemetryDataType int, vers return nil, err } metricClient, err := buildAdxClient(config, version) - if err != nil { return nil, err } diff --git a/exporter/azuredataexplorerexporter/adx_exporter_test.go b/exporter/azuredataexplorerexporter/adx_exporter_test.go index 269aabb6d493..7bd1313347fb 100644 --- a/exporter/azuredataexplorerexporter/adx_exporter_test.go +++ b/exporter/azuredataexplorerexporter/adx_exporter_test.go @@ -25,7 +25,8 @@ import ( func TestNewExporter(t *testing.T) { logger := zaptest.NewLogger(t) - c := Config{ClusterURI: "https://CLUSTER.kusto.windows.net", + c := Config{ + ClusterURI: "https://CLUSTER.kusto.windows.net", ApplicationID: "unknown", ApplicationKey: "unknown", TenantID: "unknown", diff --git a/exporter/azuredataexplorerexporter/factory.go b/exporter/azuredataexplorerexporter/factory.go index 886f9336f3a2..4e45ff99c941 100644 --- a/exporter/azuredataexplorerexporter/factory.go +++ b/exporter/azuredataexplorerexporter/factory.go @@ -64,7 +64,6 @@ func createMetricsExporter( // call the common exporter function in baseexporter. This ensures that the client and the ingest // are initialized and the metrics struct are available for operations adp, err := newExporter(adxCfg, set.Logger, metricsType, version) - if err != nil { return nil, err } @@ -78,7 +77,6 @@ func createMetricsExporter( exporterhelper.WithRetry(adxCfg.BackOffConfig), exporterhelper.WithQueue(adxCfg.QueueSettings), exporterhelper.WithShutdown(adp.Close)) - if err != nil { return nil, err } @@ -96,7 +94,6 @@ func createTracesExporter( // call the common exporter function in baseexporter. This ensures that the client and the ingest // are initialized and the metrics struct are available for operations adp, err := newExporter(adxCfg, set.Logger, tracesType, version) - if err != nil { return nil, err } @@ -110,7 +107,6 @@ func createTracesExporter( exporterhelper.WithRetry(adxCfg.BackOffConfig), exporterhelper.WithQueue(adxCfg.QueueSettings), exporterhelper.WithShutdown(adp.Close)) - if err != nil { return nil, err } @@ -128,7 +124,6 @@ func createLogsExporter( // call the common exporter function in baseexporter. This ensures that the client and the ingest // are initialized and the metrics struct are available for operations adp, err := newExporter(adxCfg, set.Logger, logsType, version) - if err != nil { return nil, err } @@ -142,7 +137,6 @@ func createLogsExporter( exporterhelper.WithRetry(adxCfg.BackOffConfig), exporterhelper.WithQueue(adxCfg.QueueSettings), exporterhelper.WithShutdown(adp.Close)) - if err != nil { return nil, err } diff --git a/exporter/azuredataexplorerexporter/go.mod b/exporter/azuredataexplorerexporter/go.mod index c4408c7a1b81..1bd805b124f1 100644 --- a/exporter/azuredataexplorerexporter/go.mod +++ b/exporter/azuredataexplorerexporter/go.mod @@ -7,7 +7,7 @@ require ( 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.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configopaque v1.20.0 diff --git a/exporter/azuredataexplorerexporter/go.sum b/exporter/azuredataexplorerexporter/go.sum index 580deb38d9e2..0425e48846b8 100644 --- a/exporter/azuredataexplorerexporter/go.sum +++ b/exporter/azuredataexplorerexporter/go.sum @@ -112,8 +112,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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/exporter/azuredataexplorerexporter/metricsdata_to_adx.go b/exporter/azuredataexplorerexporter/metricsdata_to_adx.go index ff2398016ee3..a80fc1342d56 100644 --- a/exporter/azuredataexplorerexporter/metricsdata_to_adx.go +++ b/exporter/azuredataexplorerexporter/metricsdata_to_adx.go @@ -133,8 +133,7 @@ func mapToAdxMetric(res pcommon.Resource, md pmetric.Metric, scopeattrs map[stri value := uint64(0) // now create buckets for each bound. for bi := 0; bi < bounds.Len(); bi++ { - customMap := - copyMap(map[string]any{"le": float64ToDimValue(bounds.At(bi))}, dataPoint.Attributes().AsRaw()) + customMap := copyMap(map[string]any{"le": float64ToDimValue(bounds.At(bi))}, dataPoint.Attributes().AsRaw()) value += counts.At(bi) vMap := pcommon.NewMap() @@ -151,10 +150,9 @@ func mapToAdxMetric(res pcommon.Resource, md pmetric.Metric, scopeattrs map[stri // add an upper bound for +Inf { // Add the LE field for the bucket's bound - customMap := - copyMap(map[string]any{ - "le": float64ToDimValue(math.Inf(1)), - }, dataPoint.Attributes().AsRaw()) + customMap := copyMap(map[string]any{ + "le": float64ToDimValue(math.Inf(1)), + }, dataPoint.Attributes().AsRaw()) vMap := pcommon.NewMap() //nolint:errcheck vMap.FromRaw(customMap) diff --git a/exporter/azuredataexplorerexporter/metricsdata_to_adx_test.go b/exporter/azuredataexplorerexporter/metricsdata_to_adx_test.go index 9d0b10929936..99089b23f2d5 100644 --- a/exporter/azuredataexplorerexporter/metricsdata_to_adx_test.go +++ b/exporter/azuredataexplorerexporter/metricsdata_to_adx_test.go @@ -23,13 +23,17 @@ const ( ) // The timestamps used for the tests -var tsUnix = time.Unix(time.Now().Unix(), time.Now().UnixNano()) -var ts = pcommon.NewTimestampFromTime(tsUnix) -var tstr = ts.AsTime().Format(time.RFC3339Nano) +var ( + tsUnix = time.Unix(time.Now().Unix(), time.Now().UnixNano()) + ts = pcommon.NewTimestampFromTime(tsUnix) + tstr = ts.AsTime().Format(time.RFC3339Nano) +) // the histogram values and distribution for the tests -var distributionBounds = []float64{1, 2, 4} -var distributionCounts = []uint64{4, 2, 3, 5} +var ( + distributionBounds = []float64{1, 2, 4} + distributionCounts = []uint64{4, 2, 3, 5} +) func Test_rawMetricsToAdxMetrics(t *testing.T) { t.Parallel() diff --git a/exporter/azuredataexplorerexporter/tracesdata_to_adx_test.go b/exporter/azuredataexplorerexporter/tracesdata_to_adx_test.go index 55e6b2e67301..9a570c544eab 100644 --- a/exporter/azuredataexplorerexporter/tracesdata_to_adx_test.go +++ b/exporter/azuredataexplorerexporter/tracesdata_to_adx_test.go @@ -61,7 +61,8 @@ func Test_mapToAdxTrace(t *testing.T) { Events: getEmptyEvents(), Links: getEmptyLinks(), }, - }, { + }, + { name: "No data", spanDatafn: func() ptrace.Span { span := ptrace.NewSpan() @@ -79,7 +80,8 @@ func Test_mapToAdxTrace(t *testing.T) { Events: getEmptyEvents(), Links: getEmptyLinks(), }, - }, { + }, + { name: "with_events_links", spanDatafn: func() ptrace.Span { span := ptrace.NewSpan() diff --git a/exporter/azuremonitorexporter/channels.go b/exporter/azuremonitorexporter/channels.go index 9c50d03c48ee..5b30e94fc11c 100644 --- a/exporter/azuremonitorexporter/channels.go +++ b/exporter/azuremonitorexporter/channels.go @@ -7,4 +7,5 @@ import "github.com/microsoft/ApplicationInsights-Go/appinsights/contracts" type transportChannel interface { Send(*contracts.Envelope) + Flush() } diff --git a/exporter/azuremonitorexporter/config_test.go b/exporter/azuremonitorexporter/config_test.go index 48be4f03d159..d63c025a3d6c 100644 --- a/exporter/azuremonitorexporter/config_test.go +++ b/exporter/azuremonitorexporter/config_test.go @@ -29,7 +29,6 @@ func TestLoadConfig(t *testing.T) { id component.ID expected component.Config }{ - { id: component.NewIDWithName(metadata.Type, ""), expected: createDefaultConfig(), diff --git a/exporter/azuremonitorexporter/factory.go b/exporter/azuremonitorexporter/factory.go index 35364d934f53..39801b81f822 100644 --- a/exporter/azuremonitorexporter/factory.go +++ b/exporter/azuremonitorexporter/factory.go @@ -24,9 +24,7 @@ const ( defaultEndpoint = "https://dc.services.visualstudio.com/v2/track" ) -var ( - errUnexpectedConfigurationType = errors.New("failed to cast configuration to Azure Monitor Config") -) +var errUnexpectedConfigurationType = errors.New("failed to cast configuration to Azure Monitor Config") // NewFactory returns a factory for Azure Monitor exporter. func NewFactory() exporter.Factory { diff --git a/exporter/azuremonitorexporter/factory_test.go b/exporter/azuremonitorexporter/factory_test.go index 67c2cdf60250..c0875782bd14 100644 --- a/exporter/azuremonitorexporter/factory_test.go +++ b/exporter/azuremonitorexporter/factory_test.go @@ -12,8 +12,7 @@ import ( ) // An inappropriate config -type badConfig struct { -} +type badConfig struct{} func TestCreateTracesUsingSpecificTransportChannel(t *testing.T) { // mock transport channel creation diff --git a/exporter/azuremonitorexporter/go.mod b/exporter/azuremonitorexporter/go.mod index ea4dd40a72f9..284f9471417e 100644 --- a/exporter/azuremonitorexporter/go.mod +++ b/exporter/azuremonitorexporter/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/microsoft/ApplicationInsights-Go v0.4.4 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configopaque v1.20.0 diff --git a/exporter/azuremonitorexporter/go.sum b/exporter/azuremonitorexporter/go.sum index a1685bfccd20..31acdc61bb54 100644 --- a/exporter/azuremonitorexporter/go.sum +++ b/exporter/azuremonitorexporter/go.sum @@ -64,8 +64,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/exporter/azuremonitorexporter/logexporter.go b/exporter/azuremonitorexporter/logexporter.go index e181a5100826..1eacc80261b0 100644 --- a/exporter/azuremonitorexporter/logexporter.go +++ b/exporter/azuremonitorexporter/logexporter.go @@ -35,7 +35,8 @@ func (exporter *logExporter) onLogData(_ context.Context, logData plog.Logs) err } } } - + // Flush the transport channel to force the telemetry to be sent + exporter.transportChannel.Flush() return nil } diff --git a/exporter/azuremonitorexporter/metricexporter.go b/exporter/azuremonitorexporter/metricexporter.go index 16d6d6ba14b2..b0b3bbd2bd1a 100644 --- a/exporter/azuremonitorexporter/metricexporter.go +++ b/exporter/azuremonitorexporter/metricexporter.go @@ -37,6 +37,8 @@ func (exporter *metricExporter) onMetricData(_ context.Context, metricData pmetr } } + // Flush the transport channel to force the telemetry to be sent + exporter.transportChannel.Flush() return nil } diff --git a/exporter/azuremonitorexporter/mock_transportChannel.go b/exporter/azuremonitorexporter/mock_transportChannel.go index 269eb4ac65f6..1d34e3a03a52 100644 --- a/exporter/azuremonitorexporter/mock_transportChannel.go +++ b/exporter/azuremonitorexporter/mock_transportChannel.go @@ -19,3 +19,7 @@ type mockTransportChannel struct { func (_m *mockTransportChannel) Send(_a0 *contracts.Envelope) { _m.Called(_a0) } + +func (_m *mockTransportChannel) Flush() { + _m.Called() +} diff --git a/exporter/azuremonitorexporter/time_utils_test.go b/exporter/azuremonitorexporter/time_utils_test.go index 1034ae9f17a3..78807c89a276 100644 --- a/exporter/azuremonitorexporter/time_utils_test.go +++ b/exporter/azuremonitorexporter/time_utils_test.go @@ -17,7 +17,7 @@ func TestToTime(t *testing.T) { output := toTime(input) assert.NotNil(t, output) - expected := time.Date(1970, 01, 01, 00, 01, 00, 1, time.UTC) + expected := time.Date(1970, 0o1, 0o1, 0o0, 0o1, 0o0, 1, time.UTC) assert.Equal(t, "1970-01-01T00:01:00.000000001Z", expected.Format(time.RFC3339Nano)) } diff --git a/exporter/azuremonitorexporter/trace_to_envelope.go b/exporter/azuremonitorexporter/trace_to_envelope.go index 219902658f11..7839aa373502 100644 --- a/exporter/azuremonitorexporter/trace_to_envelope.go +++ b/exporter/azuremonitorexporter/trace_to_envelope.go @@ -47,7 +47,8 @@ func spanToEnvelopes( instrumentationScope pcommon.InstrumentationScope, span ptrace.Span, spanEventsEnabled bool, - logger *zap.Logger) ([]*contracts.Envelope, error) { + logger *zap.Logger, +) ([]*contracts.Envelope, error) { spanKind := span.Kind() // According to the SpanKind documentation, we can assume it to be INTERNAL @@ -550,7 +551,8 @@ func fillRemoteDependencyDataMessaging(span ptrace.Span, data *contracts.RemoteD func copyAndMapAttributes( attributeMap pcommon.Map, properties map[string]string, - mappingFunc func(k string, v pcommon.Value)) { + mappingFunc func(k string, v pcommon.Value), +) { attributeMap.Range(func(k string, v pcommon.Value) bool { setAttributeValueAsProperty(k, v, properties) if mappingFunc != nil { @@ -563,14 +565,16 @@ 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) { + properties map[string]string, +) { copyAndMapAttributes(attributeMap, properties, nil) } // Attribute extraction logic for HTTP Span attributes func copyAndExtractHTTPAttributes( attributeMap pcommon.Map, - properties map[string]string) *HTTPAttributes { + properties map[string]string, +) *HTTPAttributes { attrs := &HTTPAttributes{} copyAndMapAttributes( attributeMap, @@ -583,7 +587,8 @@ func copyAndExtractHTTPAttributes( // Attribute extraction logic for RPC Span attributes func copyAndExtractRPCAttributes( attributeMap pcommon.Map, - properties map[string]string) *RPCAttributes { + properties map[string]string, +) *RPCAttributes { attrs := &RPCAttributes{} copyAndMapAttributes( attributeMap, @@ -596,7 +601,8 @@ func copyAndExtractRPCAttributes( // Attribute extraction logic for Database Span attributes func copyAndExtractDatabaseAttributes( attributeMap pcommon.Map, - properties map[string]string) *DatabaseAttributes { + properties map[string]string, +) *DatabaseAttributes { attrs := &DatabaseAttributes{} copyAndMapAttributes( attributeMap, @@ -609,7 +615,8 @@ func copyAndExtractDatabaseAttributes( // Attribute extraction logic for Messaging Span attributes func copyAndExtractMessagingAttributes( attributeMap pcommon.Map, - properties map[string]string) *MessagingAttributes { + properties map[string]string, +) *MessagingAttributes { attrs := &MessagingAttributes{} copyAndMapAttributes( attributeMap, @@ -622,7 +629,8 @@ func copyAndExtractMessagingAttributes( // Attribute extraction logic for Span event exception attributes func copyAndExtractExceptionAttributes( attributeMap pcommon.Map, - properties map[string]string) *ExceptionAttributes { + properties map[string]string, +) *ExceptionAttributes { attrs := &ExceptionAttributes{} copyAndMapAttributes( attributeMap, @@ -696,7 +704,8 @@ func writeFormattedPeerAddressFromNetworkAttributes(networkAttributes *NetworkAt func setAttributeValueAsProperty( key string, attributeValue pcommon.Value, - properties map[string]string) { + properties map[string]string, +) { switch attributeValue.Type() { case pcommon.ValueTypeBool: properties[key] = strconv.FormatBool(attributeValue.Bool()) diff --git a/exporter/azuremonitorexporter/trace_to_envelope_test.go b/exporter/azuremonitorexporter/trace_to_envelope_test.go index 441919546f64..2390e71e48d4 100644 --- a/exporter/azuremonitorexporter/trace_to_envelope_test.go +++ b/exporter/azuremonitorexporter/trace_to_envelope_test.go @@ -566,7 +566,8 @@ func commonEnvelopeValidations( t *testing.T, span ptrace.Span, envelope *contracts.Envelope, - expectedEnvelopeName string) { + expectedEnvelopeName string, +) { assert.NotNil(t, envelope) assert.Equal(t, expectedEnvelopeName, envelope.Name) assert.Equal(t, toTime(span.StartTimestamp()).Format(time.RFC3339Nano), envelope.Time) @@ -587,7 +588,8 @@ func commonEnvelopeValidations( func commonRequestDataValidations( t *testing.T, span ptrace.Span, - data *contracts.RequestData) { + data *contracts.RequestData, +) { assertAttributesCopiedToProperties(t, span.Attributes(), data.Properties) assert.Equal(t, defaultSpanIDAsHex, data.Id) assert.Equal(t, defaultSpanDuration, data.Duration) @@ -600,7 +602,8 @@ func commonRequestDataValidations( func defaultHTTPRequestDataValidations( t *testing.T, span ptrace.Span, - data *contracts.RequestData) { + data *contracts.RequestData, +) { commonRequestDataValidations(t, span, data) assert.Equal(t, defaultHTTPStatusCodeAsString, data.ResponseCode) @@ -612,7 +615,8 @@ func defaultHTTPRequestDataValidations( func commonRemoteDependencyDataValidations( t *testing.T, span ptrace.Span, - data *contracts.RemoteDependencyData) { + data *contracts.RemoteDependencyData, +) { assertAttributesCopiedToProperties(t, span.Attributes(), data.Properties) assert.Equal(t, defaultSpanIDAsHex, data.Id) assert.Equal(t, defaultSpanDuration, data.Duration) @@ -622,7 +626,8 @@ func commonRemoteDependencyDataValidations( func defaultHTTPRemoteDependencyDataValidations( t *testing.T, span ptrace.Span, - data *contracts.RemoteDependencyData) { + data *contracts.RemoteDependencyData, +) { commonRemoteDependencyDataValidations(t, span, data) assert.Equal(t, defaultHTTPStatusCodeAsString, data.ResultCode) @@ -635,7 +640,8 @@ func defaultRPCRequestDataValidations( t *testing.T, span ptrace.Span, data *contracts.RequestData, - expectedDataSource string) { + expectedDataSource string, +) { commonRequestDataValidations(t, span, data) assert.Equal(t, defaultRPCStatusCodeAsString, data.ResponseCode) @@ -649,7 +655,8 @@ func defaultRPCRemoteDependencyDataValidations( t *testing.T, span ptrace.Span, data *contracts.RemoteDependencyData, - expectedDataTarget string) { + expectedDataTarget string, +) { commonRemoteDependencyDataValidations(t, span, data) assert.Equal(t, defaultRPCStatusCodeAsString, data.ResultCode) @@ -665,7 +672,8 @@ func defaultRPCRemoteDependencyDataValidations( func defaultDatabaseRemoteDependencyDataValidations( t *testing.T, span ptrace.Span, - data *contracts.RemoteDependencyData) { + data *contracts.RemoteDependencyData, +) { commonRemoteDependencyDataValidations(t, span, data) assert.Equal(t, defaultDatabaseStatusCodeAsString, data.ResultCode) @@ -677,7 +685,8 @@ func defaultDatabaseRemoteDependencyDataValidations( func defaultMessagingRequestDataValidations( t *testing.T, span ptrace.Span, - data *contracts.RequestData) { + data *contracts.RequestData, +) { commonRequestDataValidations(t, span, data) assert.Equal(t, defaultMessagingStatusCodeAsString, data.ResponseCode) @@ -688,7 +697,8 @@ func defaultMessagingRequestDataValidations( func defaultMessagingRemoteDependencyDataValidations( t *testing.T, span ptrace.Span, - data *contracts.RemoteDependencyData) { + data *contracts.RemoteDependencyData, +) { commonRemoteDependencyDataValidations(t, span, data) assert.Equal(t, defaultMessagingStatusCodeAsString, data.ResultCode) @@ -700,7 +710,8 @@ func defaultMessagingRemoteDependencyDataValidations( func defaultInternalRemoteDependencyDataValidations( t *testing.T, span ptrace.Span, - data *contracts.RemoteDependencyData) { + data *contracts.RemoteDependencyData, +) { assertAttributesCopiedToProperties(t, span.Attributes(), data.Properties) assert.Equal(t, "InProc", data.Type) } @@ -709,7 +720,8 @@ func defaultInternalRemoteDependencyDataValidations( func assertAttributesCopiedToProperties( t *testing.T, attributeMap pcommon.Map, - properties map[string]string) { + properties map[string]string, +) { attributeMap.Range(func(k string, v pcommon.Value) bool { p, exists := properties[k] assert.True(t, exists) diff --git a/exporter/azuremonitorexporter/traceexporter.go b/exporter/azuremonitorexporter/traceexporter.go index 3dedaf1ee551..66326d2f540b 100644 --- a/exporter/azuremonitorexporter/traceexporter.go +++ b/exporter/azuremonitorexporter/traceexporter.go @@ -30,7 +30,8 @@ type traceVisitor struct { func (v *traceVisitor) visit( resource pcommon.Resource, scope pcommon.InstrumentationScope, - span ptrace.Span) (ok bool) { + span ptrace.Span, +) (ok bool) { envelopes, err := spanToEnvelopes(resource, scope, span, v.exporter.config.SpanEventsEnabled, v.exporter.logger) if err != nil { // record the error and short-circuit @@ -45,6 +46,8 @@ func (v *traceVisitor) visit( v.exporter.transportChannel.Send(envelope) } + // Flush the transport channel to force the telemetry to be sent + v.exporter.transportChannel.Flush() v.processed++ return true diff --git a/exporter/azuremonitorexporter/traceexporter_test.go b/exporter/azuremonitorexporter/traceexporter_test.go index a4fc97be457d..d58a2dc9fd52 100644 --- a/exporter/azuremonitorexporter/traceexporter_test.go +++ b/exporter/azuremonitorexporter/traceexporter_test.go @@ -15,9 +15,7 @@ import ( "golang.org/x/net/context" ) -var ( - defaultConfig = createDefaultConfig().(*Config) -) +var defaultConfig = createDefaultConfig().(*Config) // Tests the export onTraceData callback with no Spans func TestExporterTraceDataCallbackNoSpans(t *testing.T) { @@ -118,6 +116,7 @@ func TestExporterTraceDataCallbackSingleSpanNoEnvelope(t *testing.T) { func getMockTransportChannel() *mockTransportChannel { transportChannelMock := mockTransportChannel{} transportChannelMock.On("Send", mock.Anything) + transportChannelMock.On("Flush", mock.Anything) return &transportChannelMock } diff --git a/exporter/carbonexporter/config_test.go b/exporter/carbonexporter/config_test.go index fd0d0c0c3759..795f0622d702 100644 --- a/exporter/carbonexporter/config_test.go +++ b/exporter/carbonexporter/config_test.go @@ -31,7 +31,6 @@ func TestLoadConfig(t *testing.T) { expected component.Config errorMessage string }{ - { id: component.NewIDWithName(metadata.Type, ""), expected: createDefaultConfig(), diff --git a/exporter/carbonexporter/factory.go b/exporter/carbonexporter/factory.go index 6343eb2502fa..5622d8627482 100644 --- a/exporter/carbonexporter/factory.go +++ b/exporter/carbonexporter/factory.go @@ -46,7 +46,6 @@ func createMetricsExporter( config component.Config, ) (exporter.Metrics, error) { exp, err := newCarbonExporter(ctx, config.(*Config), params) - if err != nil { return nil, err } diff --git a/exporter/carbonexporter/go.mod b/exporter/carbonexporter/go.mod index 785d4fcaca53..30d64ce64295 100644 --- a/exporter/carbonexporter/go.mod +++ b/exporter/carbonexporter/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confignet v1.20.0 diff --git a/exporter/carbonexporter/go.sum b/exporter/carbonexporter/go.sum index b1c966f82324..dd0d201c3aa3 100644 --- a/exporter/carbonexporter/go.sum +++ b/exporter/carbonexporter/go.sum @@ -48,8 +48,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/exporter/cassandraexporter/config_test.go b/exporter/cassandraexporter/config_test.go index 41799aa6c579..a00d6d21e7af 100644 --- a/exporter/cassandraexporter/config_test.go +++ b/exporter/cassandraexporter/config_test.go @@ -15,8 +15,10 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassandraexporter/internal/metadata" ) -const defaultDSN = "127.0.0.1" -const defaultPort = 9042 +const ( + defaultDSN = "127.0.0.1" + defaultPort = 9042 +) func TestLoadConfig(t *testing.T) { t.Parallel() @@ -32,7 +34,6 @@ func TestLoadConfig(t *testing.T) { id component.ID expected component.Config }{ - { id: component.NewIDWithName(metadata.Type, ""), expected: defaultCfg, diff --git a/exporter/cassandraexporter/go.mod b/exporter/cassandraexporter/go.mod index c2fe03cd8b6a..658771e9a2cb 100644 --- a/exporter/cassandraexporter/go.mod +++ b/exporter/cassandraexporter/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/gocql/gocql v1.7.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configopaque v1.20.0 diff --git a/exporter/cassandraexporter/go.sum b/exporter/cassandraexporter/go.sum index 5d4b2af0dccb..081f1a76c0eb 100644 --- a/exporter/cassandraexporter/go.sum +++ b/exporter/cassandraexporter/go.sum @@ -60,8 +60,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/exporter/clickhouseexporter/config.go b/exporter/clickhouseexporter/config.go index f21d96a77830..05ddf2e09903 100644 --- a/exporter/clickhouseexporter/config.go +++ b/exporter/clickhouseexporter/config.go @@ -81,14 +81,16 @@ type TableEngine struct { Params string `mapstructure:"params"` } -const defaultDatabase = "default" -const defaultTableEngineName = "MergeTree" -const defaultMetricTableName = "otel_metrics" -const defaultGaugeSuffix = "_gauge" -const defaultSumSuffix = "_sum" -const defaultSummarySuffix = "_summary" -const defaultHistogramSuffix = "_histogram" -const defaultExpHistogramSuffix = "_exponential_histogram" +const ( + defaultDatabase = "default" + defaultTableEngineName = "MergeTree" + defaultMetricTableName = "otel_metrics" + defaultGaugeSuffix = "_gauge" + defaultSumSuffix = "_sum" + defaultSummarySuffix = "_summary" + defaultHistogramSuffix = "_histogram" + defaultExpHistogramSuffix = "_exponential_histogram" +) var ( errConfigNoEndpoint = errors.New("endpoint must be specified") diff --git a/exporter/clickhouseexporter/config_test.go b/exporter/clickhouseexporter/config_test.go index 233d73abe232..b3167ed52fc7 100644 --- a/exporter/clickhouseexporter/config_test.go +++ b/exporter/clickhouseexporter/config_test.go @@ -40,7 +40,6 @@ func TestLoadConfig(t *testing.T) { id component.ID expected component.Config }{ - { id: component.NewIDWithName(metadata.Type, ""), expected: defaultCfg, diff --git a/exporter/clickhouseexporter/exporter_logs.go b/exporter/clickhouseexporter/exporter_logs.go index a4987457420a..7f985fdbd38b 100644 --- a/exporter/clickhouseexporter/exporter_logs.go +++ b/exporter/clickhouseexporter/exporter_logs.go @@ -71,13 +71,13 @@ func (e *logsExporter) pushLogsData(ctx context.Context, ld plog.Logs) error { defer func() { _ = statement.Close() }() - var serviceName string for i := 0; i < ld.ResourceLogs().Len(); i++ { logs := ld.ResourceLogs().At(i) res := logs.Resource() resURL := logs.SchemaUrl() resAttr := attributesToMap(res.Attributes()) + var serviceName string if v, ok := res.Attributes().Get(conventions.AttributeServiceName); ok { serviceName = v.Str() } diff --git a/exporter/clickhouseexporter/exporter_logs_test.go b/exporter/clickhouseexporter/exporter_logs_test.go index 5ab742e32b68..62afa0f091fd 100644 --- a/exporter/clickhouseexporter/exporter_logs_test.go +++ b/exporter/clickhouseexporter/exporter_logs_test.go @@ -128,6 +128,22 @@ func TestExporter_pushLogsData(t *testing.T) { exporter := newTestLogsExporter(t, defaultEndpoint) mustPushLogsData(t, exporter, simpleLogsWithNoTimestamp(1)) }) + t.Run("test with 2 log records with different service.name", func(t *testing.T) { + initClickhouseTestServer(t, func(query string, values []driver.Value) error { + if strings.HasPrefix(query, "INSERT") { + body, _ := values[7].(string) + if body == "empty ServiceName" { + require.Equal(t, "", values[6]) + } else { + require.Equal(t, "test-service", values[6]) + } + } + return nil + }) + + exporter := newTestLogsExporter(t, defaultEndpoint) + mustPushLogsData(t, exporter, multipleLogsWithDifferentServiceName(1)) + }) } func TestLogsClusterConfig(t *testing.T) { @@ -215,6 +231,30 @@ func simpleLogsWithNoTimestamp(count int) plog.Logs { return logs } +func multipleLogsWithDifferentServiceName(count int) plog.Logs { + logs := simpleLogs(count) + rl := logs.ResourceLogs().AppendEmpty() + rl.SetSchemaUrl("https://opentelemetry.io/schemas/1.4.0") + sl := rl.ScopeLogs().AppendEmpty() + sl.SetSchemaUrl("https://opentelemetry.io/schemas/1.7.0") + 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.SetObservedTimestamp(pcommon.NewTimestampFromTime(timestamp)) + r.SetSeverityNumber(plog.SeverityNumberError2) + r.SetSeverityText("error") + r.Body().SetStr("empty ServiceName") + 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 +} + func mustPushLogsData(t *testing.T, exporter *logsExporter, ld plog.Logs) { err := exporter.pushLogsData(context.TODO(), ld) require.NoError(t, err) @@ -283,8 +323,7 @@ func (t *testClickhouseDriverStmt) Query(_ []driver.Value) (driver.Rows, error) return nil, nil } -type testClickhouseDriverTx struct { -} +type testClickhouseDriverTx struct{} func (*testClickhouseDriverTx) Commit() error { return nil diff --git a/exporter/clickhouseexporter/exporter_sql_test.go b/exporter/clickhouseexporter/exporter_sql_test.go index 0a01b1c284ef..b2c3942b7542 100644 --- a/exporter/clickhouseexporter/exporter_sql_test.go +++ b/exporter/clickhouseexporter/exporter_sql_test.go @@ -13,12 +13,14 @@ import ( "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 -} +type ( + clusterTestCompletion func(t *testing.T, dsn string, clusterTest clusterTestConfig, fns ...func(*Config)) + clusterTestConfig struct { + name string + cluster string + shouldPass bool + } +) func (test clusterTestConfig) verifyConfig(t *testing.T, cfg *Config) { if test.cluster == "" { @@ -86,14 +88,16 @@ func testClusterConfig(t *testing.T, completion clusterTestCompletion) { } } -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 -} +type ( + tableEngineTestCompletion func(t *testing.T, dsn string, engineTest tableEngineTestConfig, fns ...func(*Config)) + tableEngineTestConfig struct { + name string + engineName string + engineParams string + expectedTableName string + shouldPass bool + } +) func (engineTest tableEngineTestConfig) verifyConfig(t *testing.T, te TableEngine) { if engineTest.engineName == "" { diff --git a/exporter/clickhouseexporter/go.mod b/exporter/clickhouseexporter/go.mod index 36de95a83dea..5a40b8eff04b 100644 --- a/exporter/clickhouseexporter/go.mod +++ b/exporter/clickhouseexporter/go.mod @@ -7,7 +7,7 @@ require ( github.com/cenkalti/backoff/v4 v4.3.0 github.com/jmoiron/sqlx v1.4.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.34.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/exporter/clickhouseexporter/go.sum b/exporter/clickhouseexporter/go.sum index d19914c01535..4416374e0ea4 100644 --- a/exporter/clickhouseexporter/go.sum +++ b/exporter/clickhouseexporter/go.sum @@ -155,8 +155,8 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= diff --git a/exporter/coralogixexporter/config.go b/exporter/coralogixexporter/config.go index 0c786d20710d..df679be3c5d0 100644 --- a/exporter/coralogixexporter/config.go +++ b/exporter/coralogixexporter/config.go @@ -63,6 +63,7 @@ func isEmpty(endpoint string) bool { } return false } + func (c *Config) Validate() error { // validate that at least one endpoint is set up correctly if isEmpty(c.Domain) && diff --git a/exporter/coralogixexporter/go.mod b/exporter/coralogixexporter/go.mod index e3c049fa90f9..da6d976017b5 100644 --- a/exporter/coralogixexporter/go.mod +++ b/exporter/coralogixexporter/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configcompression v1.20.0 diff --git a/exporter/coralogixexporter/go.sum b/exporter/coralogixexporter/go.sum index 8c56912c6b01..aea8072b525a 100644 --- a/exporter/coralogixexporter/go.sum +++ b/exporter/coralogixexporter/go.sum @@ -56,8 +56,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/exporter/coralogixexporter/traces_client.go b/exporter/coralogixexporter/traces_client.go index e3ce96d81c86..2b5665624687 100644 --- a/exporter/coralogixexporter/traces_client.go +++ b/exporter/coralogixexporter/traces_client.go @@ -89,6 +89,7 @@ func (e *tracesExporter) pushTraces(ctx context.Context, td ptrace.Traces) error return nil } + func (e *tracesExporter) shutdown(context.Context) error { if e.clientConn == nil { return nil diff --git a/exporter/datadogexporter/README.md b/exporter/datadogexporter/README.md index 2cd5641076bb..73524f795985 100644 --- a/exporter/datadogexporter/README.md +++ b/exporter/datadogexporter/README.md @@ -6,7 +6,7 @@ | 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%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), [@dineshg13](https://www.github.com/dineshg13), [@liustanley](https://www.github.com/liustanley), [@songy23](https://www.github.com/songy23), [@mackjmr](https://www.github.com/mackjmr), [@ankitpatel96](https://www.github.com/ankitpatel96) | +| [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), [@ankitpatel96](https://www.github.com/ankitpatel96), [@jade-guiton-dd](https://www.github.com/jade-guiton-dd) | | Emeritus | [@gbbr](https://www.github.com/gbbr) | [beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta diff --git a/exporter/datadogexporter/go.mod b/exporter/datadogexporter/go.mod index 4501b6384bef..573a069dbb68 100644 --- a/exporter/datadogexporter/go.mod +++ b/exporter/datadogexporter/go.mod @@ -55,7 +55,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/config/configauth v0.114.0 // indirect go.opentelemetry.io/collector/config/configcompression v1.20.0 @@ -86,8 +86,8 @@ require ( google.golang.org/protobuf v1.35.2 gopkg.in/yaml.v2 v2.4.0 gopkg.in/zorkian/go-datadog-api.v2 v2.30.0 - k8s.io/apimachinery v0.31.2 - k8s.io/client-go v0.31.2 + k8s.io/apimachinery v0.31.3 + k8s.io/client-go v0.31.3 ) require ( @@ -406,7 +406,7 @@ require ( 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.31.2 // indirect + k8s.io/api v0.31.3 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect diff --git a/exporter/datadogexporter/go.sum b/exporter/datadogexporter/go.sum index da4569e8ba74..458b60aeaf42 100644 --- a/exporter/datadogexporter/go.sum +++ b/exporter/datadogexporter/go.sum @@ -948,8 +948,9 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= @@ -1631,14 +1632,14 @@ 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.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= -k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= -k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= -k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= 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= diff --git a/exporter/datadogexporter/integrationtest/go.mod b/exporter/datadogexporter/integrationtest/go.mod index faea991e3e44..e69874aec5ce 100644 --- a/exporter/datadogexporter/integrationtest/go.mod +++ b/exporter/datadogexporter/integrationtest/go.mod @@ -9,7 +9,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/tinylib/msgp v1.2.4 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 @@ -381,9 +381,9 @@ require ( 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.31.2 // indirect - k8s.io/apimachinery v0.31.2 // indirect - k8s.io/client-go v0.31.2 // indirect + k8s.io/api v0.31.3 // indirect + k8s.io/apimachinery v0.31.3 // indirect + k8s.io/client-go v0.31.3 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect diff --git a/exporter/datadogexporter/integrationtest/go.sum b/exporter/datadogexporter/integrationtest/go.sum index 759a652a0125..2f2e3ed65eb9 100644 --- a/exporter/datadogexporter/integrationtest/go.sum +++ b/exporter/datadogexporter/integrationtest/go.sum @@ -934,8 +934,9 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tidwall/gjson v1.10.2 h1:APbLGOM0rrEkd8WBw9C24nllro4ajFuJu0Sc9hRz8Bo= github.com/tidwall/gjson v1.10.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= @@ -1617,14 +1618,14 @@ 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.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= -k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= -k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= -k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= 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= diff --git a/exporter/datadogexporter/internal/clientutil/http_test.go b/exporter/datadogexporter/internal/clientutil/http_test.go index 95fa023a6965..1327b85279c4 100644 --- a/exporter/datadogexporter/internal/clientutil/http_test.go +++ b/exporter/datadogexporter/internal/clientutil/http_test.go @@ -19,12 +19,10 @@ import ( "go.opentelemetry.io/collector/config/configtls" ) -var ( - buildInfo = component.BuildInfo{ - Command: "otelcontribcol", - Version: "1.0", - } -) +var buildInfo = component.BuildInfo{ + Command: "otelcontribcol", + Version: "1.0", +} func TestNewHTTPClient(t *testing.T) { hcsEmpty := confighttp.ClientConfig{} diff --git a/exporter/datadogexporter/internal/hostmetadata/host.go b/exporter/datadogexporter/internal/hostmetadata/host.go index c99e689ac73b..99f267afc39c 100644 --- a/exporter/datadogexporter/internal/hostmetadata/host.go +++ b/exporter/datadogexporter/internal/hostmetadata/host.go @@ -72,7 +72,6 @@ func GetSourceProvider(set component.TelemetrySettings, configHostname string, t []string{"config", "azure", "ecs", "ec2", "gcp", "kubernetes", "system"}, timeout, ) - if err != nil { return nil, err } diff --git a/exporter/datadogexporter/internal/hostmetadata/internal/azure/provider.go b/exporter/datadogexporter/internal/hostmetadata/internal/azure/provider.go index bf66f14273ad..e6decc49f9be 100644 --- a/exporter/datadogexporter/internal/hostmetadata/internal/azure/provider.go +++ b/exporter/datadogexporter/internal/hostmetadata/internal/azure/provider.go @@ -15,8 +15,10 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/azure" ) -var _ source.Provider = (*Provider)(nil) -var _ provider.ClusterNameProvider = (*Provider)(nil) +var ( + _ source.Provider = (*Provider)(nil) + _ provider.ClusterNameProvider = (*Provider)(nil) +) type Provider struct { detector azure.Provider diff --git a/exporter/datadogexporter/internal/hostmetadata/internal/ec2/ec2.go b/exporter/datadogexporter/internal/hostmetadata/internal/ec2/ec2.go index d0920ecc5856..ef20a5382106 100644 --- a/exporter/datadogexporter/internal/hostmetadata/internal/ec2/ec2.go +++ b/exporter/datadogexporter/internal/hostmetadata/internal/ec2/ec2.go @@ -21,9 +21,7 @@ import ( ec2provider "github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/aws/ec2" ) -var ( - defaultPrefixes = [3]string{"ip-", "domu", "ec2amaz-"} -) +var defaultPrefixes = [3]string{"ip-", "domu", "ec2amaz-"} type HostInfo struct { InstanceID string @@ -82,8 +80,10 @@ func (hi *HostInfo) GetHostname(_ *zap.Logger) string { return hi.EC2Hostname } -var _ source.Provider = (*Provider)(nil) -var _ provider.ClusterNameProvider = (*Provider)(nil) +var ( + _ source.Provider = (*Provider)(nil) + _ provider.ClusterNameProvider = (*Provider)(nil) +) type Provider struct { once sync.Once diff --git a/exporter/datadogexporter/internal/hostmetadata/internal/gcp/provider.go b/exporter/datadogexporter/internal/hostmetadata/internal/gcp/provider.go index 5951494a804a..eeb7fb7c046b 100644 --- a/exporter/datadogexporter/internal/hostmetadata/internal/gcp/provider.go +++ b/exporter/datadogexporter/internal/hostmetadata/internal/gcp/provider.go @@ -15,8 +15,10 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/provider" ) -var _ source.Provider = (*Provider)(nil) -var _ provider.ClusterNameProvider = (*Provider)(nil) +var ( + _ source.Provider = (*Provider)(nil) + _ provider.ClusterNameProvider = (*Provider)(nil) +) var _ gcpDetector = gcp.NewDetector() diff --git a/exporter/datadogexporter/internal/hostmetadata/internal/k8s/nodename.go b/exporter/datadogexporter/internal/hostmetadata/internal/k8s/nodename.go index 70c919da2de6..2431b2a9c3f7 100644 --- a/exporter/datadogexporter/internal/hostmetadata/internal/k8s/nodename.go +++ b/exporter/datadogexporter/internal/hostmetadata/internal/k8s/nodename.go @@ -70,7 +70,6 @@ func newNodeNameProvider() nodeNameProvider { client, err := k8sconfig.MakeClient(k8sconfig.APIConfig{ AuthType: k8sconfig.AuthTypeServiceAccount, }) - if err != nil { return &nodeNameUnavailable{err: err} } diff --git a/exporter/datadogexporter/internal/hostmetadata/internal/k8s/provider_test.go b/exporter/datadogexporter/internal/hostmetadata/internal/k8s/provider_test.go index cda386036f59..2f168604b1c3 100644 --- a/exporter/datadogexporter/internal/hostmetadata/internal/k8s/provider_test.go +++ b/exporter/datadogexporter/internal/hostmetadata/internal/k8s/provider_test.go @@ -15,16 +15,20 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/provider" ) -var _ provider.ClusterNameProvider = (*StringProvider)(nil) -var _ nodeNameProvider = (*StringProvider)(nil) +var ( + _ provider.ClusterNameProvider = (*StringProvider)(nil) + _ nodeNameProvider = (*StringProvider)(nil) +) type StringProvider string func (p StringProvider) ClusterName(context.Context) (string, error) { return string(p), nil } func (p StringProvider) NodeName(context.Context) (string, error) { return string(p), nil } -var _ provider.ClusterNameProvider = (*ErrorProvider)(nil) -var _ nodeNameProvider = (*ErrorProvider)(nil) +var ( + _ provider.ClusterNameProvider = (*ErrorProvider)(nil) + _ nodeNameProvider = (*ErrorProvider)(nil) +) type ErrorProvider string diff --git a/exporter/datadogexporter/internal/metrics/consumer.go b/exporter/datadogexporter/internal/metrics/consumer.go index ae00f7237034..2d43e604ea5d 100644 --- a/exporter/datadogexporter/internal/metrics/consumer.go +++ b/exporter/datadogexporter/internal/metrics/consumer.go @@ -15,9 +15,11 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metrics/sketches" ) -var _ metrics.Consumer = (*Consumer)(nil) -var _ metrics.HostConsumer = (*Consumer)(nil) -var _ metrics.TagsConsumer = (*Consumer)(nil) +var ( + _ metrics.Consumer = (*Consumer)(nil) + _ metrics.HostConsumer = (*Consumer)(nil) + _ metrics.TagsConsumer = (*Consumer)(nil) +) // Consumer implements metrics.Consumer. It records consumed metrics, sketches and // APM stats payloads. It provides them to the caller using the All method. diff --git a/exporter/datadogexporter/internal/metrics/consumer_deprecated.go b/exporter/datadogexporter/internal/metrics/consumer_deprecated.go index c47c2acda3a6..0b71f2c98d88 100644 --- a/exporter/datadogexporter/internal/metrics/consumer_deprecated.go +++ b/exporter/datadogexporter/internal/metrics/consumer_deprecated.go @@ -14,9 +14,11 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metrics/sketches" ) -var _ metrics.Consumer = (*ZorkianConsumer)(nil) -var _ metrics.HostConsumer = (*ZorkianConsumer)(nil) -var _ metrics.TagsConsumer = (*ZorkianConsumer)(nil) +var ( + _ metrics.Consumer = (*ZorkianConsumer)(nil) + _ metrics.HostConsumer = (*ZorkianConsumer)(nil) + _ metrics.TagsConsumer = (*ZorkianConsumer)(nil) +) // ZorkianConsumer implements metrics.Consumer. It records consumed metrics, sketches and // APM stats payloads. It provides them to the caller using the All method. diff --git a/exporter/datadogexporter/metadata.yaml b/exporter/datadogexporter/metadata.yaml index 4000568a1f3e..bb1f67478bbe 100644 --- a/exporter/datadogexporter/metadata.yaml +++ b/exporter/datadogexporter/metadata.yaml @@ -6,7 +6,7 @@ status: beta: [traces, metrics, logs] distributions: [contrib] codeowners: - active: [mx-psi, dineshg13, liustanley, songy23, mackjmr, ankitpatel96] + active: [mx-psi, dineshg13, liustanley, songy23, mackjmr, ankitpatel96, jade-guiton-dd] emeritus: [gbbr] tests: diff --git a/exporter/datadogexporter/metrics_exporter.go b/exporter/datadogexporter/metrics_exporter.go index 18f5b76fe122..ed2938e0a474 100644 --- a/exporter/datadogexporter/metrics_exporter.go +++ b/exporter/datadogexporter/metrics_exporter.go @@ -19,6 +19,7 @@ import ( "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes/source" otlpmetrics "github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics" "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/featuregate" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" "go.uber.org/zap" @@ -29,9 +30,20 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metrics" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metrics/sketches" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/scrub" - datadogconfig "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog/config" ) +var metricRemappingDisableddFeatureGate = featuregate.GlobalRegistry().MustRegister( + "exporter.datadogexporter.metricremappingdisabled", + featuregate.StageAlpha, + featuregate.WithRegisterDescription("When enabled the Datadog Exporter remaps OpenTelemetry semantic conventions to Datadog semantic conventions. This feature gate is only for internal use."), + featuregate.WithRegisterReferenceURL("https://docs.datadoghq.com/opentelemetry/schema_semantics/metrics_mapping/"), +) + +// isMetricRemappingDisabled returns true if the datadogexporter should generate Datadog-compliant metrics from OpenTelemetry metrics +func isMetricRemappingDisabled() bool { + return metricRemappingDisableddFeatureGate.IsEnabled() +} + type metricsExporter struct { params exporter.Settings cfg *Config @@ -61,7 +73,16 @@ func newMetricsExporter( metadataReporter *inframetadata.Reporter, statsOut chan []byte, ) (*metricsExporter, error) { - tr, err := datadogconfig.TranslatorFromConfig(params.TelemetrySettings, cfg.Metrics, attrsTranslator, sourceProvider, statsOut) + options := cfg.Metrics.ToTranslatorOpts() + options = append(options, otlpmetrics.WithFallbackSourceProvider(sourceProvider)) + options = append(options, otlpmetrics.WithStatsOut(statsOut)) + if isMetricRemappingDisabled() { + params.TelemetrySettings.Logger.Warn("Metric remapping is disabled in the Datadog exporter. OpenTelemetry metrics must be mapped to Datadog semantics before metrics are exported to Datadog (ex: via a processor).") + } else { + options = append(options, otlpmetrics.WithRemapping()) + } + + tr, err := otlpmetrics.NewTranslator(params.TelemetrySettings, attrsTranslator, options...) if err != nil { return nil, err } diff --git a/exporter/datasetexporter/config.go b/exporter/datasetexporter/config.go index c489758bef36..ffc61e1401c0 100644 --- a/exporter/datasetexporter/config.go +++ b/exporter/datasetexporter/config.go @@ -18,8 +18,10 @@ import ( "go.opentelemetry.io/collector/exporter/exporterhelper" ) -const exportSeparatorDefault = "." -const exportDistinguishingSuffix = "_" +const ( + exportSeparatorDefault = "." + exportDistinguishingSuffix = "_" +) // exportSettings configures separator and distinguishing suffixes for all exported fields type exportSettings struct { @@ -52,12 +54,14 @@ func newDefaultTracesSettings() TracesSettings { } } -const logsExportResourceInfoDefault = false -const logsExportResourcePrefixDefault = "resource.attributes." -const logsExportScopeInfoDefault = true -const logsExportScopePrefixDefault = "scope.attributes." -const logsDecomposeComplexMessageFieldDefault = false -const logsDecomposedComplexMessageFieldPrefixDefault = "body.map." +const ( + logsExportResourceInfoDefault = false + logsExportResourcePrefixDefault = "resource.attributes." + logsExportScopeInfoDefault = true + logsExportScopePrefixDefault = "scope.attributes." + logsDecomposeComplexMessageFieldDefault = false + logsDecomposedComplexMessageFieldPrefixDefault = "body.map." +) type LogsSettings struct { // ExportResourceInfo is optional flag to signal that the resource info is being exported to DataSet while exporting Logs. @@ -105,13 +109,15 @@ 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 -const bufferRetryShutdownTimeout = 30 * time.Second -const bufferMaxParallelOutgoing = 100 +const ( + bufferMaxLifetime = 5 * time.Second + bufferPurgeOlderThan = 30 * time.Second + bufferRetryInitialInterval = 5 * time.Second + bufferRetryMaxInterval = 30 * time.Second + bufferRetryMaxElapsedTime = 300 * time.Second + bufferRetryShutdownTimeout = 30 * time.Second + bufferMaxParallelOutgoing = 100 +) type BufferSettings struct { MaxLifetime time.Duration `mapstructure:"max_lifetime"` diff --git a/exporter/datasetexporter/go.mod b/exporter/datasetexporter/go.mod index ff3a1525247a..c856dc2f6587 100644 --- a/exporter/datasetexporter/go.mod +++ b/exporter/datasetexporter/go.mod @@ -7,7 +7,7 @@ require ( // github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/filestorage v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/scalyr/dataset-go v0.20.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 go.opentelemetry.io/collector/exporter v0.114.0 diff --git a/exporter/datasetexporter/go.sum b/exporter/datasetexporter/go.sum index be3119f6df79..230cee3c6b08 100644 --- a/exporter/datasetexporter/go.sum +++ b/exporter/datasetexporter/go.sum @@ -48,8 +48,8 @@ github.com/scalyr/dataset-go v0.20.0 h1:VZJew4W/ufnb67yZSpWQKI40U4XpA+w+cDM+mk0q github.com/scalyr/dataset-go v0.20.0/go.mod h1:k/A+KhdEyffuTGb1n+jSWg8J5ikV9iYVKejVGjGXXoA= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/exporter/datasetexporter/logs_exporter_test.go b/exporter/datasetexporter/logs_exporter_test.go index 3b8c6e3a4ee7..c07b44c27781 100644 --- a/exporter/datasetexporter/logs_exporter_test.go +++ b/exporter/datasetexporter/logs_exporter_test.go @@ -672,6 +672,7 @@ func TestBuildEventFromLogExportScopeInfo(t *testing.T) { assert.Equal(t, expected, was) } + func TestBuildEventFromLogEventWithoutTimestampWithObservedTimestampUseObservedTimestamp(t *testing.T) { // When LogRecord doesn't have timestamp set, but it has ObservedTimestamp set, // ObservedTimestamp should be used diff --git a/exporter/datasetexporter/traces_exporter.go b/exporter/datasetexporter/traces_exporter.go index 04382e2be245..c1fde0ae0935 100644 --- a/exporter/datasetexporter/traces_exporter.go +++ b/exporter/datasetexporter/traces_exporter.go @@ -88,8 +88,10 @@ func buildEventFromSpan( } } -const resourceName = "resource_name" -const resourceType = "resource_type" +const ( + resourceName = "resource_name" + resourceType = "resource_type" +) type ResourceType string @@ -134,7 +136,7 @@ type spanBundle struct { } func buildEventsFromTraces(ld ptrace.Traces, serverHost string, settings TracesSettings) []*add_events.EventBundle { - var spans = make([]spanBundle, 0) + spans := make([]spanBundle, 0) // convert spans into events resourceSpans := ld.ResourceSpans() diff --git a/exporter/datasetexporter/traces_exporter_test.go b/exporter/datasetexporter/traces_exporter_test.go index f74c8f63c0b5..0c905ce021cf 100644 --- a/exporter/datasetexporter/traces_exporter_test.go +++ b/exporter/datasetexporter/traces_exporter_test.go @@ -433,29 +433,41 @@ func TestBuildEventsFromTracesFromTwoSpansSameResourceOneDifferent(t *testing.T) assert.Equal(t, expected, was) } -var span0Id = [8]byte{1, 1, 1, 1, 1, 1, 1, 1} -var span00Id = [8]byte{1, 2, 1, 1, 1, 1, 1, 1} -var span01Id = [8]byte{1, 3, 1, 1, 1, 1, 1, 1} -var span000Id = [8]byte{1, 2, 2, 1, 1, 1, 1, 1} -var span001Id = [8]byte{1, 2, 3, 1, 1, 1, 1, 1} -var span002Id = [8]byte{1, 2, 4, 1, 1, 1, 1, 1} +var ( + span0Id = [8]byte{1, 1, 1, 1, 1, 1, 1, 1} + span00Id = [8]byte{1, 2, 1, 1, 1, 1, 1, 1} + span01Id = [8]byte{1, 3, 1, 1, 1, 1, 1, 1} + span000Id = [8]byte{1, 2, 2, 1, 1, 1, 1, 1} + span001Id = [8]byte{1, 2, 3, 1, 1, 1, 1, 1} + span002Id = [8]byte{1, 2, 4, 1, 1, 1, 1, 1} +) -var span1Id = [8]byte{2, 2, 2, 2, 2, 2, 2, 2} -var span10Id = [8]byte{2, 3, 2, 2, 2, 2, 2, 2} +var ( + span1Id = [8]byte{2, 2, 2, 2, 2, 2, 2, 2} + span10Id = [8]byte{2, 3, 2, 2, 2, 2, 2, 2} +) -var span21Id = [8]byte{3, 3, 3, 3, 3, 3, 3, 3} -var span22Id = [8]byte{3, 4, 3, 3, 3, 3, 3, 3} +var ( + span21Id = [8]byte{3, 3, 3, 3, 3, 3, 3, 3} + span22Id = [8]byte{3, 4, 3, 3, 3, 3, 3, 3} +) -var span21PId = [8]byte{3, 5, 3, 3, 3, 3, 3, 3} -var span22PId = [8]byte{3, 6, 3, 3, 3, 3, 3, 3} +var ( + span21PId = [8]byte{3, 5, 3, 3, 3, 3, 3, 3} + span22PId = [8]byte{3, 6, 3, 3, 3, 3, 3, 3} +) -var span3Id = [8]byte{4, 4, 4, 4, 4, 4, 4, 4} -var span30Id = [8]byte{4, 5, 4, 4, 4, 4, 4, 4} +var ( + span3Id = [8]byte{4, 4, 4, 4, 4, 4, 4, 4} + span30Id = [8]byte{4, 5, 4, 4, 4, 4, 4, 4} +) -var trace0Id = [16]byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1} -var trace1Id = [16]byte{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2} -var trace2Id = [16]byte{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3} -var trace3Id = [16]byte{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4} +var ( + trace0Id = [16]byte{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1} + trace1Id = [16]byte{2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2} + trace2Id = [16]byte{3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3} + trace3Id = [16]byte{4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4} +) func generateTracesTreesAndOrphans() ptrace.Traces { td := ptrace.NewTraces() diff --git a/exporter/dorisexporter/exporter_common_test.go b/exporter/dorisexporter/exporter_common_test.go index b4bef2904818..baea71b36bb9 100644 --- a/exporter/dorisexporter/exporter_common_test.go +++ b/exporter/dorisexporter/exporter_common_test.go @@ -47,7 +47,6 @@ func TestStreamLoadUrl(t *testing.T) { func findRandomPort() (int, error) { l, err := net.Listen("tcp", "localhost:0") - if err != nil { return 0, err } @@ -55,7 +54,6 @@ func findRandomPort() (int, error) { port := l.Addr().(*net.TCPAddr).Port err = l.Close() - if err != nil { return 0, err } diff --git a/exporter/dorisexporter/go.mod b/exporter/dorisexporter/go.mod index 88f1ab2e594e..8d567529b311 100644 --- a/exporter/dorisexporter/go.mod +++ b/exporter/dorisexporter/go.mod @@ -7,7 +7,7 @@ require ( // https://github.com/go-sql-driver/mysql/issues/1602; https://github.com/apache/doris/pull/32177 github.com/go-sql-driver/mysql v1.8.1 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/config/configopaque v1.20.0 go.opentelemetry.io/collector/config/configretry v1.20.0 diff --git a/exporter/dorisexporter/go.sum b/exporter/dorisexporter/go.sum index e07b6c35f0ba..c2192330e01f 100644 --- a/exporter/dorisexporter/go.sum +++ b/exporter/dorisexporter/go.sum @@ -64,8 +64,8 @@ github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/exporter/elasticsearchexporter/README.md b/exporter/elasticsearchexporter/README.md index 53a093109557..13ecfa53507d 100644 --- a/exporter/elasticsearchexporter/README.md +++ b/exporter/elasticsearchexporter/README.md @@ -89,15 +89,16 @@ The Elasticsearch exporter supports the common [`sending_queue` settings][export The Elasticsearch exporter supports the [common `batcher` settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterbatcher/config.go). - `batcher`: - - `enabled` (default=unset): Enable batching of requests into a single bulk request. - - `min_size_items` (default=5000): Minimum number of log records / spans in the buffer to trigger a flush immediately. - - `max_size_items` (default=10000): Maximum number of log records / spans in a request. - - `flush_timeout` (default=30s): Maximum time of the oldest item spent inside the buffer, aka "max age of buffer". A flush will happen regardless of the size of content in buffer. + - `enabled` (default=unset): Enable batching of requests into 1 or more bulk requests. On a batcher flush, it is possible for a batched request to be translated to more than 1 bulk request due to `flush::bytes`. + - `min_size_items` (default=5000): Minimum number of log records / spans / data points in the batched request to immediately trigger a batcher flush. + - `max_size_items` (default=0): Maximum number of log records / spans / data points in a batched request. To limit bulk request size, configure `flush::bytes` instead. :warning: It is recommended to keep `max_size_items` as 0 as a non-zero value may lead to broken metrics grouping and indexing rejections. + - `flush_timeout` (default=30s): Maximum time of the oldest item spent inside the batcher buffer, aka "max age of batcher buffer". A batcher flush will happen regardless of the size of content in batcher buffer. By default, the exporter will perform its own buffering and batching, as configured through the `flush` config, and `batcher` will be unused. By setting `batcher::enabled` to either `true` or -`false`, the exporter will not perform any of its own buffering or batching, and the `flush` config -will be ignored. In a future release when the `batcher` config is stable, and has feature parity +`false`, the exporter will not perform any of its own buffering or batching, and the `flush::interval` config +will be ignored. +In a future release when the `batcher` config is stable, and has feature parity with the exporter's existing `flush` config, it will be enabled by default. Using the common `batcher` functionality provides several benefits over the default behavior: @@ -198,7 +199,7 @@ The behaviour of this bulk indexing can be configured with the following setting - `num_workers` (default=runtime.NumCPU()): Number of workers publishing bulk requests concurrently. - `flush`: Event bulk indexer buffer flush settings - - `bytes` (default=5000000): Write buffer flush size limit. + - `bytes` (default=5000000): Write buffer flush size limit before compression. A bulk request will be sent immediately when its buffer exceeds this limit. This value should be much lower than [Elasticsearch's `http.max_content_length`](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#http-settings) config to avoid HTTP 413 Entity Too Large error. It is recommended to keep this value under 5MB. - `interval` (default=30s): Write buffer flush time limit. - `retry`: Elasticsearch bulk request retry settings - `enabled` (default=true): Enable/Disable request retry on error. Failed requests are retried with exponential backoff. @@ -209,7 +210,7 @@ The behaviour of this bulk indexing can be configured with the following setting - `retry_on_status` (default=[429]): Status codes that trigger request or document level retries. Request level retry and document level retry status codes are shared and cannot be configured separately. To avoid duplicates, it defaults to `[429]`. > [!NOTE] -> The `flush` config will be ignored when `batcher::enabled` config is explicitly set to `true` or `false`. +> The `flush::interval` config will be ignored when `batcher::enabled` config is explicitly set to `true` or `false`. ### Elasticsearch node discovery diff --git a/exporter/elasticsearchexporter/bulkindexer.go b/exporter/elasticsearchexporter/bulkindexer.go index 1700b03619d6..2200216be4ef 100644 --- a/exporter/elasticsearchexporter/bulkindexer.go +++ b/exporter/elasticsearchexporter/bulkindexer.go @@ -88,6 +88,7 @@ func newSyncBulkIndexer(logger *zap.Logger, client *elasticsearch.Client, config return &syncBulkIndexer{ config: bulkIndexerConfig(client, config), flushTimeout: config.Timeout, + flushBytes: config.Flush.Bytes, retryConfig: config.Retry, logger: logger, } @@ -96,6 +97,7 @@ func newSyncBulkIndexer(logger *zap.Logger, client *elasticsearch.Client, config type syncBulkIndexer struct { config docappender.BulkIndexerConfig flushTimeout time.Duration + flushBytes int retryConfig RetrySettings logger *zap.Logger } @@ -124,8 +126,17 @@ type syncBulkIndexerSession struct { } // Add adds an item to the sync bulk indexer session. -func (s *syncBulkIndexerSession) Add(_ context.Context, index string, document io.WriterTo, dynamicTemplates map[string]string) error { - return s.bi.Add(docappender.BulkIndexerItem{Index: index, Body: document, DynamicTemplates: dynamicTemplates}) +func (s *syncBulkIndexerSession) Add(ctx context.Context, index string, document io.WriterTo, dynamicTemplates map[string]string) error { + err := s.bi.Add(docappender.BulkIndexerItem{Index: index, Body: document, DynamicTemplates: dynamicTemplates}) + if err != nil { + return err + } + // flush bytes should operate on uncompressed length + // as Elasticsearch http.max_content_length measures uncompressed length. + if s.bi.UncompressedLen() >= s.s.flushBytes { + return s.Flush(ctx) + } + return nil } // End is a no-op. @@ -170,16 +181,6 @@ func newAsyncBulkIndexer(logger *zap.Logger, client *elasticsearch.Client, confi numWorkers = runtime.NumCPU() } - flushInterval := config.Flush.Interval - if flushInterval == 0 { - flushInterval = 30 * time.Second - } - - flushBytes := config.Flush.Bytes - if flushBytes == 0 { - flushBytes = 5e+6 - } - pool := &asyncBulkIndexer{ wg: sync.WaitGroup{}, items: make(chan docappender.BulkIndexerItem, config.NumWorkers), @@ -195,9 +196,9 @@ func newAsyncBulkIndexer(logger *zap.Logger, client *elasticsearch.Client, confi w := asyncBulkIndexerWorker{ indexer: bi, items: pool.items, - flushInterval: flushInterval, + flushInterval: config.Flush.Interval, flushTimeout: config.Timeout, - flushBytes: flushBytes, + flushBytes: config.Flush.Bytes, logger: logger, stats: &pool.stats, } @@ -298,8 +299,9 @@ func (w *asyncBulkIndexerWorker) run() { w.logger.Error("error adding item to bulk indexer", zap.Error(err)) } - // w.indexer.Len() can be either compressed or uncompressed bytes - if w.indexer.Len() >= w.flushBytes { + // flush bytes should operate on uncompressed length + // as Elasticsearch http.max_content_length measures uncompressed length. + if w.indexer.UncompressedLen() >= w.flushBytes { w.flush() flushTick.Reset(w.flushInterval) } diff --git a/exporter/elasticsearchexporter/bulkindexer_test.go b/exporter/elasticsearchexporter/bulkindexer_test.go index e0213adaab79..e09a26f121b7 100644 --- a/exporter/elasticsearchexporter/bulkindexer_test.go +++ b/exporter/elasticsearchexporter/bulkindexer_test.go @@ -9,6 +9,7 @@ import ( "io" "net/http" "strings" + "sync/atomic" "testing" "time" @@ -122,6 +123,7 @@ func TestAsyncBulkIndexer_requireDataStream(t *testing.T) { config: Config{ NumWorkers: 1, Mapping: MappingsSettings{Mode: MappingECS.String()}, + Flush: FlushSettings{Interval: time.Hour, Bytes: 1e+8}, }, wantRequireDataStream: false, }, @@ -130,6 +132,7 @@ func TestAsyncBulkIndexer_requireDataStream(t *testing.T) { config: Config{ NumWorkers: 1, Mapping: MappingsSettings{Mode: MappingOTel.String()}, + Flush: FlushSettings{Interval: time.Hour, Bytes: 1e+8}, }, wantRequireDataStream: true, }, @@ -252,6 +255,7 @@ func TestAsyncBulkIndexer_logRoundTrip(t *testing.T) { config: Config{ NumWorkers: 1, ClientConfig: confighttp.ClientConfig{Compression: "none"}, + Flush: FlushSettings{Interval: time.Hour, Bytes: 1e+8}, }, }, { @@ -259,6 +263,7 @@ func TestAsyncBulkIndexer_logRoundTrip(t *testing.T) { config: Config{ NumWorkers: 1, ClientConfig: confighttp.ClientConfig{Compression: "gzip"}, + Flush: FlushSettings{Interval: time.Hour, Bytes: 1e+8}, }, }, } @@ -316,3 +321,28 @@ func runBulkIndexerOnce(t *testing.T, config *Config, client *elasticsearch.Clie return bulkIndexer } + +func TestSyncBulkIndexer_flushBytes(t *testing.T) { + var reqCnt atomic.Int64 + cfg := Config{NumWorkers: 1, Flush: FlushSettings{Interval: time.Hour, Bytes: 1}} + client, err := elasticsearch.NewClient(elasticsearch.Config{Transport: &mockTransport{ + RoundTripFunc: func(r *http.Request) (*http.Response, error) { + if r.URL.Path == "/_bulk" { + reqCnt.Add(1) + } + return &http.Response{ + Header: http.Header{"X-Elastic-Product": []string{"Elasticsearch"}}, + Body: io.NopCloser(strings.NewReader(successResp)), + }, nil + }, + }}) + require.NoError(t, err) + + bi := newSyncBulkIndexer(zap.NewNop(), client, &cfg) + session, err := bi.StartSession(context.Background()) + require.NoError(t, err) + + assert.NoError(t, session.Add(context.Background(), "foo", strings.NewReader(`{"foo": "bar"}`), nil)) + assert.Equal(t, int64(1), reqCnt.Load()) // flush due to flush::bytes + assert.NoError(t, bi.Close(context.Background())) +} diff --git a/exporter/elasticsearchexporter/config_test.go b/exporter/elasticsearchexporter/config_test.go index baec2bd9646a..f3f848db2c90 100644 --- a/exporter/elasticsearchexporter/config_test.go +++ b/exporter/elasticsearchexporter/config_test.go @@ -93,7 +93,8 @@ func TestConfig(t *testing.T) { OnStart: true, }, Flush: FlushSettings{ - Bytes: 10485760, + Bytes: 10485760, + Interval: 30 * time.Second, }, Retry: RetrySettings{ Enabled: true, @@ -117,7 +118,7 @@ func TestConfig(t *testing.T) { MinSizeItems: 5000, }, MaxSizeConfig: exporterbatcher.MaxSizeConfig{ - MaxSizeItems: 10000, + MaxSizeItems: 0, }, }, }, @@ -164,7 +165,8 @@ func TestConfig(t *testing.T) { OnStart: true, }, Flush: FlushSettings{ - Bytes: 10485760, + Bytes: 10485760, + Interval: 30 * time.Second, }, Retry: RetrySettings{ Enabled: true, @@ -188,7 +190,7 @@ func TestConfig(t *testing.T) { MinSizeItems: 5000, }, MaxSizeConfig: exporterbatcher.MaxSizeConfig{ - MaxSizeItems: 10000, + MaxSizeItems: 0, }, }, }, @@ -235,7 +237,8 @@ func TestConfig(t *testing.T) { OnStart: true, }, Flush: FlushSettings{ - Bytes: 10485760, + Bytes: 10485760, + Interval: 30 * time.Second, }, Retry: RetrySettings{ Enabled: true, @@ -259,7 +262,7 @@ func TestConfig(t *testing.T) { MinSizeItems: 5000, }, MaxSizeConfig: exporterbatcher.MaxSizeConfig{ - MaxSizeItems: 10000, + MaxSizeItems: 0, }, }, }, diff --git a/exporter/elasticsearchexporter/esclient.go b/exporter/elasticsearchexporter/esclient.go index 927f62844ec3..fe99cf8a2f12 100644 --- a/exporter/elasticsearchexporter/esclient.go +++ b/exporter/elasticsearchexporter/esclient.go @@ -130,7 +130,7 @@ func newElasticsearchClient( RetryOnStatus: config.Retry.RetryOnStatus, DisableRetry: !config.Retry.Enabled, EnableRetryOnTimeout: config.Retry.Enabled, - //RetryOnError: retryOnError, // should be used from esclient version 8 onwards + // RetryOnError: retryOnError, // should be used from esclient version 8 onwards MaxRetries: maxRetries, RetryBackoff: createElasticsearchBackoffFunc(&config.Retry), diff --git a/exporter/elasticsearchexporter/factory.go b/exporter/elasticsearchexporter/factory.go index 9cb5da2af966..4783d430196a 100644 --- a/exporter/elasticsearchexporter/factory.go +++ b/exporter/elasticsearchexporter/factory.go @@ -91,9 +91,13 @@ func createDefaultConfig() component.Config { MinSizeItems: 5000, }, MaxSizeConfig: exporterbatcher.MaxSizeConfig{ - MaxSizeItems: 10000, + MaxSizeItems: 0, }, }, + Flush: FlushSettings{ + Bytes: 5e+6, + Interval: 30 * time.Second, + }, } } diff --git a/exporter/elasticsearchexporter/go.mod b/exporter/elasticsearchexporter/go.mod index 9e4e0f8494b3..b2cc25f83552 100644 --- a/exporter/elasticsearchexporter/go.mod +++ b/exporter/elasticsearchexporter/go.mod @@ -12,7 +12,7 @@ require ( github.com/lestrrat-go/strftime v1.1.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/tidwall/gjson v1.18.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/exporter/elasticsearchexporter/go.sum b/exporter/elasticsearchexporter/go.sum index 4e01c0d9314e..7810dda8efd3 100644 --- a/exporter/elasticsearchexporter/go.sum +++ b/exporter/elasticsearchexporter/go.sum @@ -92,8 +92,8 @@ github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= diff --git a/exporter/elasticsearchexporter/integrationtest/datareceiver.go b/exporter/elasticsearchexporter/integrationtest/datareceiver.go index 79a2d46dc3d4..0039b1fd893e 100644 --- a/exporter/elasticsearchexporter/integrationtest/datareceiver.go +++ b/exporter/elasticsearchexporter/integrationtest/datareceiver.go @@ -21,6 +21,7 @@ import ( "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/pdata/plog" + "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/receivertest" @@ -32,12 +33,17 @@ import ( ) const ( - // TestLogsIndex is used by the mock ES data receiver to indentify log events. + // TestLogsIndex is used by the mock ES data receiver to identify log events. // Exporter LogsIndex configuration must be configured with TestLogsIndex for // the data receiver to work properly TestLogsIndex = "logs-test-idx" - // TestTracesIndex is used by the mock ES data receiver to indentify trace + // TestMetricsIndex is used by the mock ES data receiver to identify metric events. + // Exporter MetricsIndex configuration must be configured with TestMetricsIndex for + // the data receiver to work properly + TestMetricsIndex = "metrics-test-idx" + + // TestTracesIndex is used by the mock ES data receiver to identify trace // events. Exporter TracesIndex configuration must be configured with // TestTracesIndex for the data receiver to work properly TestTracesIndex = "traces-test-idx" @@ -79,11 +85,12 @@ func withBatcherEnabled(enabled bool) dataReceiverOption { } } -func (es *esDataReceiver) Start(tc consumer.Traces, _ consumer.Metrics, lc consumer.Logs) error { +func (es *esDataReceiver) Start(tc consumer.Traces, mc consumer.Metrics, lc consumer.Logs) error { factory := receiver.NewFactory( component.MustNewType("mockelasticsearch"), createDefaultConfig, receiver.WithLogs(createLogsReceiver, component.StabilityLevelDevelopment), + receiver.WithMetrics(createMetricsReceiver, component.StabilityLevelDevelopment), receiver.WithTraces(createTracesReceiver, component.StabilityLevelDevelopment), ) esURL, err := url.Parse(es.endpoint) @@ -101,6 +108,10 @@ func (es *esDataReceiver) Start(tc consumer.Traces, _ consumer.Metrics, lc consu if err != nil { return fmt.Errorf("failed to create logs receiver: %w", err) } + metricsReceiver, err := factory.CreateMetrics(context.Background(), set, cfg, mc) + if err != nil { + return fmt.Errorf("failed to create metrics receiver: %w", err) + } tracesReceiver, err := factory.CreateTraces(context.Background(), set, cfg, tc) if err != nil { return fmt.Errorf("failed to create traces receiver: %w", err) @@ -108,6 +119,7 @@ func (es *esDataReceiver) Start(tc consumer.Traces, _ consumer.Metrics, lc consu // Since we use SharedComponent both receivers should be same require.Same(es.t, logsReceiver, tracesReceiver) + require.Same(es.t, logsReceiver, metricsReceiver) es.receiver = logsReceiver return es.receiver.Start(context.Background(), componenttest.NewNopHost()) @@ -126,7 +138,14 @@ func (es *esDataReceiver) GenConfigYAMLStr() string { elasticsearch: endpoints: [%s] logs_index: %s + logs_dynamic_index: + enabled: false + metrics_index: %s + metrics_dynamic_index: + enabled: false traces_index: %s + traces_dynamic_index: + enabled: false sending_queue: enabled: true retry: @@ -134,7 +153,7 @@ func (es *esDataReceiver) GenConfigYAMLStr() string { initial_interval: 100ms max_interval: 1s max_requests: 10000`, - es.endpoint, TestLogsIndex, TestTracesIndex, + es.endpoint, TestLogsIndex, TestMetricsIndex, TestTracesIndex, ) if es.batcherEnabled == nil { @@ -189,6 +208,19 @@ func createLogsReceiver( return receiver, nil } +func createMetricsReceiver( + _ context.Context, + params receiver.Settings, + rawCfg component.Config, + next consumer.Metrics, +) (receiver.Metrics, error) { + receiver := receivers.GetOrAdd(rawCfg, func() component.Component { + return newMockESReceiver(params, rawCfg.(*config)) + }) + receiver.Unwrap().(*mockESReceiver).metricsConsumer = next + return receiver, nil +} + func createTracesReceiver( _ context.Context, params receiver.Settings, @@ -206,8 +238,9 @@ type mockESReceiver struct { params receiver.Settings config *config - tracesConsumer consumer.Traces - logsConsumer consumer.Logs + tracesConsumer consumer.Traces + logsConsumer consumer.Logs + metricsConsumer consumer.Metrics server *http.Server } @@ -231,10 +264,12 @@ func (es *mockESReceiver) Start(ctx context.Context, host component.Host) error // Ideally bulk request items should be converted to the corresponding event record // however, since we only assert count for now there is no need to do the actual - // translation. Instead we use a pre-initialized empty logs and traces model to + // translation. Instead we use a pre-initialized empty models to // reduce allocation impact on tests and benchmarks. emptyLogs := plog.NewLogs() emptyLogs.ResourceLogs().AppendEmpty().ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + emptyMetrics := pmetric.NewMetrics() + emptyMetrics.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty().Metrics().AppendEmpty().SetEmptySum().DataPoints().AppendEmpty() emptyTrace := ptrace.NewTraces() emptyTrace.ResourceSpans().AppendEmpty().ScopeSpans().AppendEmpty().Spans().AppendEmpty() @@ -260,6 +295,8 @@ func (es *mockESReceiver) Start(ctx context.Context, host component.Host) error switch item.Index { case TestLogsIndex: consumeErr = es.logsConsumer.ConsumeLogs(context.Background(), emptyLogs) + case TestMetricsIndex: + consumeErr = es.metricsConsumer.ConsumeMetrics(context.Background(), emptyMetrics) case TestTracesIndex: consumeErr = es.tracesConsumer.ConsumeTraces(context.Background(), emptyTrace) } diff --git a/exporter/elasticsearchexporter/integrationtest/exporter_bench_test.go b/exporter/elasticsearchexporter/integrationtest/exporter_bench_test.go index 50ed649dca0d..49106c7b084f 100644 --- a/exporter/elasticsearchexporter/integrationtest/exporter_bench_test.go +++ b/exporter/elasticsearchexporter/integrationtest/exporter_bench_test.go @@ -26,7 +26,7 @@ import ( ) func BenchmarkExporter(b *testing.B) { - for _, eventType := range []string{"logs", "traces"} { + for _, eventType := range []string{"logs", "metrics", "traces"} { for _, mappingMode := range []string{"none", "ecs", "raw"} { for _, tc := range []struct { name string @@ -41,6 +41,8 @@ func BenchmarkExporter(b *testing.B) { switch eventType { case "logs": benchmarkLogs(b, tc.batchSize, mappingMode) + case "metrics": + benchmarkMetrics(b, tc.batchSize, mappingMode) case "traces": benchmarkTraces(b, tc.batchSize, mappingMode) } @@ -79,6 +81,35 @@ func benchmarkLogs(b *testing.B, batchSize int, mappingMode string) { require.NoError(b, exporter.Shutdown(ctx)) } +func benchmarkMetrics(b *testing.B, batchSize int, mappingMode string) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + exporterSettings := exportertest.NewNopSettings() + exporterSettings.TelemetrySettings.Logger = zaptest.NewLogger(b, zaptest.Level(zap.WarnLevel)) + runnerCfg := prepareBenchmark(b, batchSize, mappingMode) + exporter, err := runnerCfg.factory.CreateMetrics( + ctx, exporterSettings, runnerCfg.esCfg, + ) + require.NoError(b, err) + require.NoError(b, exporter.Start(ctx, componenttest.NewNopHost())) + + b.ReportAllocs() + b.ResetTimer() + b.StopTimer() + for i := 0; i < b.N; i++ { + metrics, _ := runnerCfg.provider.GenerateMetrics() + b.StartTimer() + require.NoError(b, exporter.ConsumeMetrics(ctx, metrics)) + b.StopTimer() + } + b.ReportMetric( + float64(runnerCfg.generatedCount.Load())/b.Elapsed().Seconds(), + "events/s", + ) + require.NoError(b, exporter.Shutdown(ctx)) +} + func benchmarkTraces(b *testing.B, batchSize int, mappingMode string) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -134,7 +165,11 @@ func prepareBenchmark( cfg.esCfg.Mapping.Mode = mappingMode cfg.esCfg.Endpoints = []string{receiver.endpoint} cfg.esCfg.LogsIndex = TestLogsIndex + cfg.esCfg.LogsDynamicIndex.Enabled = false + cfg.esCfg.MetricsIndex = TestMetricsIndex + cfg.esCfg.MetricsDynamicIndex.Enabled = false cfg.esCfg.TracesIndex = TestTracesIndex + cfg.esCfg.TracesDynamicIndex.Enabled = false cfg.esCfg.Flush.Interval = 10 * time.Millisecond cfg.esCfg.NumWorkers = 1 diff --git a/exporter/elasticsearchexporter/integrationtest/exporter_test.go b/exporter/elasticsearchexporter/integrationtest/exporter_test.go index 013994898511..57b6f936713f 100644 --- a/exporter/elasticsearchexporter/integrationtest/exporter_test.go +++ b/exporter/elasticsearchexporter/integrationtest/exporter_test.go @@ -17,7 +17,7 @@ import ( ) func TestExporter(t *testing.T) { - for _, eventType := range []string{"logs", "traces"} { + for _, eventType := range []string{"logs", "metrics", "traces"} { for _, tc := range []struct { name string @@ -68,6 +68,8 @@ func runner(t *testing.T, eventType string, restartCollector, mockESFailure bool switch eventType { case "logs": sender = testbed.NewOTLPLogsDataSender(host, port) + case "metrics": + sender = testbed.NewOTLPMetricDataSender(host, port) case "traces": sender = testbed.NewOTLPTraceDataSender(host, port) default: diff --git a/exporter/elasticsearchexporter/integrationtest/go.mod b/exporter/elasticsearchexporter/integrationtest/go.mod index be1639d8468e..f348ec563e40 100644 --- a/exporter/elasticsearchexporter/integrationtest/go.mod +++ b/exporter/elasticsearchexporter/integrationtest/go.mod @@ -11,7 +11,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/testbed v0.114.0 github.com/shirou/gopsutil/v4 v4.24.10 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/exporter/elasticsearchexporter/integrationtest/go.sum b/exporter/elasticsearchexporter/integrationtest/go.sum index 0ce88797980d..e50afc363cde 100644 --- a/exporter/elasticsearchexporter/integrationtest/go.sum +++ b/exporter/elasticsearchexporter/integrationtest/go.sum @@ -247,8 +247,8 @@ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= diff --git a/exporter/elasticsearchexporter/internal/objmodel/objmodel.go b/exporter/elasticsearchexporter/internal/objmodel/objmodel.go index 0f6f77a4fc12..6f8a9b41add8 100644 --- a/exporter/elasticsearchexporter/internal/objmodel/objmodel.go +++ b/exporter/elasticsearchexporter/internal/objmodel/objmodel.go @@ -88,8 +88,10 @@ const ( const tsLayout = "2006-01-02T15:04:05.000000000Z" -var nilValue = Value{kind: KindNil} -var ignoreValue = Value{kind: KindIgnore} +var ( + nilValue = Value{kind: KindNil} + ignoreValue = Value{kind: KindIgnore} +) // DocumentFromAttributes creates a document from a OpenTelemetry attribute // map. All nested maps will be flattened, with keys being joined using a `.` symbol. diff --git a/exporter/elasticsearchexporter/model_test.go b/exporter/elasticsearchexporter/model_test.go index 2a813b06681a..ad414ed275fe 100644 --- a/exporter/elasticsearchexporter/model_test.go +++ b/exporter/elasticsearchexporter/model_test.go @@ -48,8 +48,10 @@ var expectedMetricsEncoded = `{"@timestamp":"2024-06-12T10:20:16.419290690Z","cp {"@timestamp":"2024-06-12T10:20:16.419290690Z","cpu":"cpu1","host":{"hostname":"my-host","name":"my-host","os":{"platform":"linux"}},"state":"user","system":{"cpu":{"time":50.09}}} {"@timestamp":"2024-06-12T10:20:16.419290690Z","cpu":"cpu1","host":{"hostname":"my-host","name":"my-host","os":{"platform":"linux"}},"state":"wait","system":{"cpu":{"time":0.95}}}` -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}` +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}` + 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{dedot: false} diff --git a/exporter/fileexporter/buffered_writer.go b/exporter/fileexporter/buffered_writer.go index 6e50b6519296..d3d8de03fc57 100644 --- a/exporter/fileexporter/buffered_writer.go +++ b/exporter/fileexporter/buffered_writer.go @@ -16,9 +16,7 @@ type bufferedWriteCloser struct { buffered *bufio.Writer } -var ( - _ io.WriteCloser = (*bufferedWriteCloser)(nil) -) +var _ io.WriteCloser = (*bufferedWriteCloser)(nil) func newBufferedWriteCloser(f io.WriteCloser) io.WriteCloser { return &bufferedWriteCloser{ diff --git a/exporter/fileexporter/buffered_writer_test.go b/exporter/fileexporter/buffered_writer_test.go index e474c4b1b3f2..ef56914076be 100644 --- a/exporter/fileexporter/buffered_writer_test.go +++ b/exporter/fileexporter/buffered_writer_test.go @@ -44,9 +44,7 @@ func TestBufferedWrites(t *testing.T) { assert.Equal(t, msg, b.String(), "Must match the expected string") } -var ( - errBenchmark error -) +var errBenchmark error func BenchmarkWriter(b *testing.B) { tempfile := func(tb testing.TB) io.WriteCloser { diff --git a/exporter/fileexporter/config.go b/exporter/fileexporter/config.go index bdd05dd278b5..43499f70e105 100644 --- a/exporter/fileexporter/config.go +++ b/exporter/fileexporter/config.go @@ -20,7 +20,6 @@ const ( // Config defines configuration for file exporter. type Config struct { - // Path of the file to write to. Path is relative to current directory. Path string `mapstructure:"path"` diff --git a/exporter/fileexporter/encoding_test.go b/exporter/fileexporter/encoding_test.go index 817e9c414ee9..e8729e0077fd 100644 --- a/exporter/fileexporter/encoding_test.go +++ b/exporter/fileexporter/encoding_test.go @@ -58,7 +58,6 @@ func TestEncoding(t *testing.T) { 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())) diff --git a/exporter/fileexporter/factory.go b/exporter/fileexporter/factory.go index 606a9386d0bb..e59b54d7319f 100644 --- a/exporter/fileexporter/factory.go +++ b/exporter/fileexporter/factory.go @@ -154,7 +154,7 @@ func newFileWriter(path string, shouldAppend bool, rotation *Rotation, flushInte } else { fileFlags |= os.O_TRUNC } - f, err := os.OpenFile(path, fileFlags, 0644) + f, err := os.OpenFile(path, fileFlags, 0o644) if err != nil { return nil, err } diff --git a/exporter/fileexporter/file_exporter_test.go b/exporter/fileexporter/file_exporter_test.go index a6ec7a5bfc9d..87cecf02ed94 100644 --- a/exporter/fileexporter/file_exporter_test.go +++ b/exporter/fileexporter/file_exporter_test.go @@ -484,8 +484,7 @@ func tempFileName(t testing.TB) string { } // errorWriter is an io.Writer that will return an error all ways -type errorWriter struct { -} +type errorWriter struct{} func (e errorWriter) Write([]byte) (n int, err error) { return 0, errors.New("all ways return error") diff --git a/exporter/fileexporter/go.mod b/exporter/fileexporter/go.mod index 90cfeda59d49..3d117ecac5a5 100644 --- a/exporter/fileexporter/go.mod +++ b/exporter/fileexporter/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/otlpencodingextension v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/exporter/fileexporter/go.sum b/exporter/fileexporter/go.sum index 7dfc8ab7ea82..8d2ae2cfaa93 100644 --- a/exporter/fileexporter/go.sum +++ b/exporter/fileexporter/go.sum @@ -52,8 +52,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/exporter/fileexporter/grouping_file_exporter.go b/exporter/fileexporter/grouping_file_exporter.go index 329c61878577..322fef47e00b 100644 --- a/exporter/fileexporter/grouping_file_exporter.go +++ b/exporter/fileexporter/grouping_file_exporter.go @@ -175,7 +175,7 @@ func (e *groupingFileExporter) getWriter(pathSegment string) (*fileWriter, error return writer, nil } - err := os.MkdirAll(path.Dir(fullPath), 0755) + err := os.MkdirAll(path.Dir(fullPath), 0o755) if err != nil { return nil, err } diff --git a/exporter/fileexporter/marshaller.go b/exporter/fileexporter/marshaller.go index e3452b93ee64..d80325d735a0 100644 --- a/exporter/fileexporter/marshaller.go +++ b/exporter/fileexporter/marshaller.go @@ -18,10 +18,12 @@ 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{}, diff --git a/exporter/googlecloudexporter/factory.go b/exporter/googlecloudexporter/factory.go index 13779af801d9..fd35483a4856 100644 --- a/exporter/googlecloudexporter/factory.go +++ b/exporter/googlecloudexporter/factory.go @@ -54,7 +54,8 @@ func createDefaultConfig() component.Config { func createLogsExporter( ctx context.Context, params exporter.Settings, - cfg component.Config) (exporter.Logs, error) { + cfg component.Config, +) (exporter.Logs, error) { eCfg := cfg.(*Config) logsExporter, err := collector.NewGoogleCloudLogsExporter(ctx, eCfg.Config, params.TelemetrySettings.Logger, params.TelemetrySettings.MeterProvider, params.BuildInfo.Version, eCfg.TimeoutSettings.Timeout) if err != nil { @@ -79,7 +80,8 @@ func createLogsExporter( func createTracesExporter( ctx context.Context, params exporter.Settings, - cfg component.Config) (exporter.Traces, error) { + cfg component.Config, +) (exporter.Traces, error) { eCfg := cfg.(*Config) tExp, err := collector.NewGoogleCloudTracesExporter(ctx, eCfg.Config, params.TelemetrySettings.Logger, params.TelemetrySettings.MeterProvider, params.BuildInfo.Version, eCfg.TimeoutSettings.Timeout) if err != nil { @@ -104,7 +106,8 @@ func createTracesExporter( func createMetricsExporter( ctx context.Context, params exporter.Settings, - cfg component.Config) (exporter.Metrics, error) { + cfg component.Config, +) (exporter.Metrics, error) { eCfg := cfg.(*Config) mExp, err := collector.NewGoogleCloudMetricsExporter(ctx, eCfg.Config, params.TelemetrySettings.Logger, params.TelemetrySettings.MeterProvider, params.BuildInfo.Version, eCfg.TimeoutSettings.Timeout) if err != nil { diff --git a/exporter/googlecloudexporter/go.mod b/exporter/googlecloudexporter/go.mod index 913e7d459899..d7b307ac6700 100644 --- a/exporter/googlecloudexporter/go.mod +++ b/exporter/googlecloudexporter/go.mod @@ -4,7 +4,7 @@ go 1.22.7 require ( github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.49.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/exporter/googlecloudexporter/go.sum b/exporter/googlecloudexporter/go.sum index 34bba8b8d43c..5ae010e216b6 100644 --- a/exporter/googlecloudexporter/go.sum +++ b/exporter/googlecloudexporter/go.sum @@ -134,8 +134,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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tidwall/gjson v1.10.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= diff --git a/exporter/googlecloudpubsubexporter/factory.go b/exporter/googlecloudpubsubexporter/factory.go index abd991718d24..3ee84921ff9e 100644 --- a/exporter/googlecloudpubsubexporter/factory.go +++ b/exporter/googlecloudpubsubexporter/factory.go @@ -84,7 +84,8 @@ func createDefaultConfig() component.Config { func createTracesExporter( ctx context.Context, set exporter.Settings, - cfg component.Config) (exporter.Traces, error) { + cfg component.Config, +) (exporter.Traces, error) { pCfg := cfg.(*Config) pubsubExporter := ensureExporter(set, pCfg) @@ -105,7 +106,8 @@ func createTracesExporter( func createMetricsExporter( ctx context.Context, set exporter.Settings, - cfg component.Config) (exporter.Metrics, error) { + cfg component.Config, +) (exporter.Metrics, error) { pCfg := cfg.(*Config) pubsubExporter := ensureExporter(set, pCfg) return exporterhelper.NewMetrics( @@ -125,7 +127,8 @@ func createMetricsExporter( func createLogsExporter( ctx context.Context, set exporter.Settings, - cfg component.Config) (exporter.Logs, error) { + cfg component.Config, +) (exporter.Logs, error) { pCfg := cfg.(*Config) pubsubExporter := ensureExporter(set, pCfg) diff --git a/exporter/googlecloudpubsubexporter/go.mod b/exporter/googlecloudpubsubexporter/go.mod index b2a7c7c8ed9f..81142b6c21b8 100644 --- a/exporter/googlecloudpubsubexporter/go.mod +++ b/exporter/googlecloudpubsubexporter/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( cloud.google.com/go/pubsub v1.45.1 github.com/google/uuid v1.6.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configretry v1.20.0 diff --git a/exporter/googlecloudpubsubexporter/go.sum b/exporter/googlecloudpubsubexporter/go.sum index 13c023188745..440f413a029f 100644 --- a/exporter/googlecloudpubsubexporter/go.sum +++ b/exporter/googlecloudpubsubexporter/go.sum @@ -104,8 +104,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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.einride.tech/aip v0.68.0 h1:4seM66oLzTpz50u4K1zlJyOXQ3tCzcJN7I22tKkjipw= diff --git a/exporter/googlecloudpubsubexporter/watermark.go b/exporter/googlecloudpubsubexporter/watermark.go index d363fa40b8fd..66997204832f 100644 --- a/exporter/googlecloudpubsubexporter/watermark.go +++ b/exporter/googlecloudpubsubexporter/watermark.go @@ -12,9 +12,11 @@ import ( "go.opentelemetry.io/collector/pdata/ptrace" ) -type metricsWatermarkFunc func(metrics pmetric.Metrics, processingTime time.Time, allowedDrift time.Duration) time.Time -type logsWatermarkFunc func(logs plog.Logs, processingTime time.Time, allowedDrift time.Duration) time.Time -type tracesWatermarkFunc func(traces ptrace.Traces, processingTime time.Time, allowedDrift time.Duration) time.Time +type ( + metricsWatermarkFunc func(metrics pmetric.Metrics, processingTime time.Time, allowedDrift time.Duration) time.Time + logsWatermarkFunc func(logs plog.Logs, processingTime time.Time, allowedDrift time.Duration) time.Time + tracesWatermarkFunc func(traces ptrace.Traces, processingTime time.Time, allowedDrift time.Duration) time.Time +) type collectFunc func(timestamp pcommon.Timestamp) bool diff --git a/exporter/googlemanagedprometheusexporter/factory.go b/exporter/googlemanagedprometheusexporter/factory.go index 235194ee84f1..01fd0e395bed 100644 --- a/exporter/googlemanagedprometheusexporter/factory.go +++ b/exporter/googlemanagedprometheusexporter/factory.go @@ -50,7 +50,8 @@ func createDefaultConfig() component.Config { func createMetricsExporter( ctx context.Context, params exporter.Settings, - cfg component.Config) (exporter.Metrics, error) { + cfg component.Config, +) (exporter.Metrics, error) { eCfg := cfg.(*Config) mExp, err := collector.NewGoogleCloudMetricsExporter(ctx, eCfg.GMPConfig.toCollectorConfig(), params.TelemetrySettings.Logger, params.TelemetrySettings.MeterProvider, params.BuildInfo.Version, eCfg.TimeoutSettings.Timeout) if err != nil { diff --git a/exporter/googlemanagedprometheusexporter/go.mod b/exporter/googlemanagedprometheusexporter/go.mod index 553e945ca231..c3dc2edc5127 100644 --- a/exporter/googlemanagedprometheusexporter/go.mod +++ b/exporter/googlemanagedprometheusexporter/go.mod @@ -6,7 +6,7 @@ require ( github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.49.0 github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.49.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/exporter/googlemanagedprometheusexporter/go.sum b/exporter/googlemanagedprometheusexporter/go.sum index 0a3477545fdc..165c149c7313 100644 --- a/exporter/googlemanagedprometheusexporter/go.sum +++ b/exporter/googlemanagedprometheusexporter/go.sum @@ -179,8 +179,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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tidwall/gjson v1.10.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/gjson v1.18.0 h1:FIDeeyB800efLX89e5a8Y0BNH+LOngJyGrIWxG2FKQY= github.com/tidwall/gjson v1.18.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= diff --git a/exporter/honeycombmarkerexporter/go.mod b/exporter/honeycombmarkerexporter/go.mod index d479f99e2490..fa6cb51212fd 100644 --- a/exporter/honeycombmarkerexporter/go.mod +++ b/exporter/honeycombmarkerexporter/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 go.opentelemetry.io/collector/config/configopaque v1.20.0 diff --git a/exporter/honeycombmarkerexporter/go.sum b/exporter/honeycombmarkerexporter/go.sum index 3325093efd6c..dd197f6b64fb 100644 --- a/exporter/honeycombmarkerexporter/go.sum +++ b/exporter/honeycombmarkerexporter/go.sum @@ -88,8 +88,8 @@ github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 h1:SIKIoA4e/5Y9ZOl0DCe3eVMLPOQzJxgZpfdHHeauNTM= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6/go.mod h1:BUbeWZiieNxAuuADTBNb3/aeje6on3DhU3rpWsQSB1E= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/exporter/honeycombmarkerexporter/logs_exporter.go b/exporter/honeycombmarkerexporter/logs_exporter.go index c46839a5c0c6..5b1747734fa7 100644 --- a/exporter/honeycombmarkerexporter/logs_exporter.go +++ b/exporter/honeycombmarkerexporter/logs_exporter.go @@ -158,7 +158,6 @@ func (e *honeycombLogsExporter) sendMarker(ctx context.Context, m marker, logRec func (e *honeycombLogsExporter) start(ctx context.Context, host component.Host) (err error) { client, err := e.httpClientSettings.ToClient(ctx, host, e.set) - if err != nil { return err } diff --git a/exporter/influxdbexporter/go.mod b/exporter/influxdbexporter/go.mod index a5755588ad4d..d3b3795634ef 100644 --- a/exporter/influxdbexporter/go.mod +++ b/exporter/influxdbexporter/go.mod @@ -7,7 +7,7 @@ require ( github.com/influxdata/influxdb-observability/common v0.5.12 github.com/influxdata/influxdb-observability/otel2influx v0.5.12 github.com/influxdata/line-protocol/v2 v2.2.1 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 diff --git a/exporter/influxdbexporter/go.sum b/exporter/influxdbexporter/go.sum index 937b99f740e4..032c34a9a609 100644 --- a/exporter/influxdbexporter/go.sum +++ b/exporter/influxdbexporter/go.sum @@ -85,8 +85,8 @@ github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/exporter/kafkaexporter/factory.go b/exporter/kafkaexporter/factory.go index 851b0345e786..eb366d7cfa8b 100644 --- a/exporter/kafkaexporter/factory.go +++ b/exporter/kafkaexporter/factory.go @@ -90,8 +90,7 @@ func createDefaultConfig() component.Config { } } -type kafkaExporterFactory struct { -} +type kafkaExporterFactory struct{} func (f *kafkaExporterFactory) createTracesExporter( ctx context.Context, diff --git a/exporter/kafkaexporter/go.mod b/exporter/kafkaexporter/go.mod index 11d57c48ffc5..793a001d03d9 100644 --- a/exporter/kafkaexporter/go.mod +++ b/exporter/kafkaexporter/go.mod @@ -15,7 +15,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.114.0 github.com/openzipkin/zipkin-go v0.4.3 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configretry v1.20.0 diff --git a/exporter/kafkaexporter/go.sum b/exporter/kafkaexporter/go.sum index 89ba84dd45ea..f29fa53bd8ca 100644 --- a/exporter/kafkaexporter/go.sum +++ b/exporter/kafkaexporter/go.sum @@ -110,8 +110,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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/exporter/kafkaexporter/jaeger_marshaler.go b/exporter/kafkaexporter/jaeger_marshaler.go index d6d6beb643c3..50640c83763f 100644 --- a/exporter/kafkaexporter/jaeger_marshaler.go +++ b/exporter/kafkaexporter/jaeger_marshaler.go @@ -55,8 +55,7 @@ type jaegerSpanMarshaler interface { encoding() string } -type jaegerProtoSpanMarshaler struct { -} +type jaegerProtoSpanMarshaler struct{} var _ jaegerSpanMarshaler = (*jaegerProtoSpanMarshaler)(nil) diff --git a/exporter/kafkaexporter/pdata_marshaler.go b/exporter/kafkaexporter/pdata_marshaler.go index e67c4bcef35b..ae9726f2cbe8 100644 --- a/exporter/kafkaexporter/pdata_marshaler.go +++ b/exporter/kafkaexporter/pdata_marshaler.go @@ -27,7 +27,7 @@ func (p pdataLogsMarshaler) Marshal(ld plog.Logs, topic string) ([]*sarama.Produ for i := 0; i < logs.Len(); i++ { resourceMetrics := logs.At(i) - var hash = pdatautil.MapHash(resourceMetrics.Resource().Attributes()) + hash := pdatautil.MapHash(resourceMetrics.Resource().Attributes()) newLogs := plog.NewLogs() resourceMetrics.CopyTo(newLogs.ResourceLogs().AppendEmpty()) @@ -80,7 +80,7 @@ func (p pdataMetricsMarshaler) Marshal(ld pmetric.Metrics, topic string) ([]*sar for i := 0; i < metrics.Len(); i++ { resourceMetrics := metrics.At(i) - var hash = pdatautil.MapHash(resourceMetrics.Resource().Attributes()) + hash := pdatautil.MapHash(resourceMetrics.Resource().Attributes()) newMetrics := pmetric.NewMetrics() resourceMetrics.CopyTo(newMetrics.ResourceMetrics().AppendEmpty()) diff --git a/exporter/kafkaexporter/raw_marshaler.go b/exporter/kafkaexporter/raw_marshaler.go index 166be57f3e06..5a9e283436e8 100644 --- a/exporter/kafkaexporter/raw_marshaler.go +++ b/exporter/kafkaexporter/raw_marshaler.go @@ -14,8 +14,7 @@ import ( var errUnsupported = errors.New("unsupported serialization") -type rawMarshaler struct { -} +type rawMarshaler struct{} func newRawMarshaler() rawMarshaler { return rawMarshaler{} diff --git a/exporter/kineticaexporter/common.go b/exporter/kineticaexporter/common.go index 222c3b010ad2..6eb68b73463c 100644 --- a/exporter/kineticaexporter/common.go +++ b/exporter/kineticaexporter/common.go @@ -741,7 +741,7 @@ func getAttributeValue(vtPair ValueTypePair) (*AttributeValue, error) { // @param chunkSize // @return [][]T func chunkBySize[T any](items []T, chunkSize int) [][]T { - var _chunks = make([][]T, 0, (len(items)/chunkSize)+1) + _chunks := make([][]T, 0, (len(items)/chunkSize)+1) for chunkSize < len(items) { items, _chunks = items[chunkSize:], append(_chunks, items[0:chunkSize:chunkSize]) } diff --git a/exporter/kineticaexporter/config_test.go b/exporter/kineticaexporter/config_test.go index 997ea5b5dbf4..d4726fe36970 100644 --- a/exporter/kineticaexporter/config_test.go +++ b/exporter/kineticaexporter/config_test.go @@ -27,7 +27,6 @@ func TestLoadConfig(t *testing.T) { id component.ID expected component.Config }{ - { id: component.MustNewIDWithName("kinetica", ""), expected: defaultCfg, diff --git a/exporter/kineticaexporter/exporter_metric_test.go b/exporter/kineticaexporter/exporter_metric_test.go index 920e602d85f5..cca7713a38a3 100644 --- a/exporter/kineticaexporter/exporter_metric_test.go +++ b/exporter/kineticaexporter/exporter_metric_test.go @@ -20,15 +20,19 @@ import ( "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= maxBodySize-2 { str := b.String() str = str[:len(str)-1] + "]}" diff --git a/exporter/mezmoexporter/exporter_test.go b/exporter/mezmoexporter/exporter_test.go index 868cdf8153bf..01588285c6dd 100644 --- a/exporter/mezmoexporter/exporter_test.go +++ b/exporter/mezmoexporter/exporter_test.go @@ -74,8 +74,8 @@ func createMaxLogData() plog.Logs { rl.ScopeLogs().AppendEmpty() // Add an empty ScopeLogs sl := rl.ScopeLogs().AppendEmpty() - var lineLen = maxMessageSize - var lineCnt = (maxBodySize / lineLen) * 2 + lineLen := maxMessageSize + lineCnt := (maxBodySize / lineLen) * 2 for i := 0; i < lineCnt; i++ { ts := pcommon.Timestamp(int64(i) * time.Millisecond.Nanoseconds()) @@ -109,11 +109,13 @@ type testServer struct { url string } -type httpAssertionCallback func(req *http.Request, body mezmoLogBody) (int, string) -type testServerParams struct { - t *testing.T - assertionsCallback httpAssertionCallback -} +type ( + httpAssertionCallback func(req *http.Request, body mezmoLogBody) (int, string) + testServerParams struct { + t *testing.T + assertionsCallback httpAssertionCallback + } +) // Creates an HTTP server to test log delivery payloads by applying a set of // assertions through the assertCB function. @@ -185,19 +187,19 @@ func TestLogsExporter(t *testing.T) { exporter := createExporter(t, config, log) t.Run("Test simple log data", func(t *testing.T) { - var logs = createSimpleLogData(3) + logs := createSimpleLogData(3) err := exporter.pushLogData(context.Background(), logs) require.NoError(t, err) }) t.Run("Test max message size", func(t *testing.T) { - var logs = createSizedPayloadLogData(maxMessageSize) + logs := createSizedPayloadLogData(maxMessageSize) err := exporter.pushLogData(context.Background(), logs) require.NoError(t, err) }) t.Run("Test max body size", func(t *testing.T) { - var logs = createMaxLogData() + logs := createMaxLogData() err := exporter.pushLogData(context.Background(), logs) require.NoError(t, err) }) diff --git a/exporter/mezmoexporter/factory_test.go b/exporter/mezmoexporter/factory_test.go index f08a3b34f4f3..77518c4cd371 100644 --- a/exporter/mezmoexporter/factory_test.go +++ b/exporter/mezmoexporter/factory_test.go @@ -26,10 +26,12 @@ func TestType(t *testing.T) { assert.Equal(t, pType, metadata.Type) } -var defaultMaxIdleConns = http.DefaultTransport.(*http.Transport).MaxIdleConns -var defaultMaxIdleConnsPerHost = http.DefaultTransport.(*http.Transport).MaxIdleConnsPerHost -var defaultMaxConnsPerHost = http.DefaultTransport.(*http.Transport).MaxConnsPerHost -var defaultIdleConnTimeout = http.DefaultTransport.(*http.Transport).IdleConnTimeout +var ( + defaultMaxIdleConns = http.DefaultTransport.(*http.Transport).MaxIdleConns + defaultMaxIdleConnsPerHost = http.DefaultTransport.(*http.Transport).MaxIdleConnsPerHost + defaultMaxConnsPerHost = http.DefaultTransport.(*http.Transport).MaxConnsPerHost + defaultIdleConnTimeout = http.DefaultTransport.(*http.Transport).IdleConnTimeout +) func TestCreateDefaultConfig(t *testing.T) { factory := NewFactory() diff --git a/exporter/mezmoexporter/go.mod b/exporter/mezmoexporter/go.mod index 982a08098c82..743a61a90c43 100644 --- a/exporter/mezmoexporter/go.mod +++ b/exporter/mezmoexporter/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/cenkalti/backoff/v4 v4.3.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 diff --git a/exporter/mezmoexporter/go.sum b/exporter/mezmoexporter/go.sum index 8dc54c23c770..8d3814cc5c32 100644 --- a/exporter/mezmoexporter/go.sum +++ b/exporter/mezmoexporter/go.sum @@ -58,8 +58,8 @@ github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/exporter/mezmoexporter/utils_test.go b/exporter/mezmoexporter/utils_test.go index c8d6b860334f..1b5e6d96082d 100644 --- a/exporter/mezmoexporter/utils_test.go +++ b/exporter/mezmoexporter/utils_test.go @@ -40,7 +40,7 @@ func TestTruncateString(t *testing.T) { func TestRandString(t *testing.T) { t.Run("Test fixed length string", func(t *testing.T) { - var s = randString(16 * 1024) + s := randString(16 * 1024) require.Len(t, s, 16*1024) }) } diff --git a/exporter/opencensusexporter/go.mod b/exporter/opencensusexporter/go.mod index be0b060141ec..eef9a6a1e65b 100644 --- a/exporter/opencensusexporter/go.mod +++ b/exporter/opencensusexporter/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configgrpc v0.114.0 diff --git a/exporter/opencensusexporter/go.sum b/exporter/opencensusexporter/go.sum index 4d0bc38213a6..a06a363219e4 100644 --- a/exporter/opencensusexporter/go.sum +++ b/exporter/opencensusexporter/go.sum @@ -104,8 +104,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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/exporter/opensearchexporter/encoder.go b/exporter/opensearchexporter/encoder.go index bc64ea1e9916..ec9696fed249 100644 --- a/exporter/opensearchexporter/encoder.go +++ b/exporter/opensearchexporter/encoder.go @@ -42,7 +42,8 @@ type encodeModel struct { func (m *encodeModel) encodeLog(resource pcommon.Resource, scope pcommon.InstrumentationScope, schemaURL string, - record plog.LogRecord) ([]byte, error) { + record plog.LogRecord, +) ([]byte, error) { if m.sso { return m.encodeLogSSO(resource, scope, schemaURL, record) } diff --git a/exporter/opensearchexporter/go.mod b/exporter/opensearchexporter/go.mod index 842a5dd3e226..23fa5ca668e0 100644 --- a/exporter/opensearchexporter/go.mod +++ b/exporter/opensearchexporter/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/opensearch-project/opensearch-go/v2 v2.3.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configauth v0.114.0 diff --git a/exporter/opensearchexporter/go.sum b/exporter/opensearchexporter/go.sum index b3d64aaa056b..a4ef91494663 100644 --- a/exporter/opensearchexporter/go.sum +++ b/exporter/opensearchexporter/go.sum @@ -87,8 +87,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/exporter/opensearchexporter/integration_test.go b/exporter/opensearchexporter/integration_test.go index cca19132e1ac..06227c2d6a13 100644 --- a/exporter/opensearchexporter/integration_test.go +++ b/exporter/opensearchexporter/integration_test.go @@ -109,7 +109,7 @@ func TestOpenSearchTraceExporter(t *testing.T) { for _, tc := range tests { // Create HTTP listener - var requestCount = 0 + requestCount := 0 ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { var err error docs := getReceivedDocuments(r.Body) @@ -239,7 +239,7 @@ func TestOpenSearchLogExporter(t *testing.T) { for _, tc := range tests { // Create HTTP listener - var requestCount = 0 + requestCount := 0 ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { var err error docs := getReceivedDocuments(r.Body) diff --git a/exporter/opensearchexporter/internal/objmodel/objmodel.go b/exporter/opensearchexporter/internal/objmodel/objmodel.go index efccbdc9f59e..de7d93da9b04 100644 --- a/exporter/opensearchexporter/internal/objmodel/objmodel.go +++ b/exporter/opensearchexporter/internal/objmodel/objmodel.go @@ -85,8 +85,10 @@ const ( const tsLayout = "2006-01-02T15:04:05.000000000Z" -var nilValue = Value{kind: KindNil} -var ignoreValue = Value{kind: KindIgnore} +var ( + nilValue = Value{kind: KindNil} + ignoreValue = Value{kind: KindIgnore} +) // DocumentFromAttributes creates a document from a OpenTelemetry attribute // map. All nested maps will be flattened, with keys being joined using a `.` symbol. diff --git a/exporter/opensearchexporter/trace_bulk_indexer.go b/exporter/opensearchexporter/trace_bulk_indexer.go index b6e7f5132e1e..4e7bcccc8a86 100644 --- a/exporter/opensearchexporter/trace_bulk_indexer.go +++ b/exporter/opensearchexporter/trace_bulk_indexer.go @@ -128,7 +128,7 @@ func attributesToMapString(attributes pcommon.Map) map[string]string { } func shouldRetryEvent(status int) bool { - var retryOnStatus = []int{500, 502, 503, 504, 429} + retryOnStatus := []int{500, 502, 503, 504, 429} for _, retryable := range retryOnStatus { if status == retryable { return true diff --git a/exporter/otelarrowexporter/go.mod b/exporter/otelarrowexporter/go.mod index 2de079447e59..0d409bc1a7b9 100644 --- a/exporter/otelarrowexporter/go.mod +++ b/exporter/otelarrowexporter/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/grpcutil v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow v0.114.0 github.com/open-telemetry/otel-arrow v0.31.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/client v1.20.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/exporter/otelarrowexporter/go.sum b/exporter/otelarrowexporter/go.sum index f7c70bd92a5c..284f4a715218 100644 --- a/exporter/otelarrowexporter/go.sum +++ b/exporter/otelarrowexporter/go.sum @@ -91,8 +91,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/exporter/otelarrowexporter/internal/arrow/common_test.go b/exporter/otelarrowexporter/internal/arrow/common_test.go index 8c2bda7a59e7..a0451e7143c0 100644 --- a/exporter/otelarrowexporter/internal/arrow/common_test.go +++ b/exporter/otelarrowexporter/internal/arrow/common_test.go @@ -51,8 +51,10 @@ type commonTestCase struct { type noisyTest bool -const Noisy noisyTest = true -const NotNoisy noisyTest = false +const ( + Noisy noisyTest = true + NotNoisy noisyTest = false +) func newTestTelemetry(t zaptest.TestingT, noisy noisyTest) (component.TelemetrySettings, *observer.ObservedLogs) { telset := componenttest.NewNopTelemetrySettings() @@ -279,8 +281,7 @@ func (tc *unresponsiveTestChannel) unblock() { // unsupportedTestChannel mimics gRPC's behavior when there is no // arrow stream service registered with the server. -type arrowUnsupportedTestChannel struct { -} +type arrowUnsupportedTestChannel struct{} func newArrowUnsupportedTestChannel() *arrowUnsupportedTestChannel { return &arrowUnsupportedTestChannel{} @@ -314,8 +315,7 @@ func (tc *arrowUnsupportedTestChannel) onRecv(_ context.Context) func() (*arrowp } // disconnectedTestChannel allows the connection to time out. -type disconnectedTestChannel struct { -} +type disconnectedTestChannel struct{} func newDisconnectedTestChannel() *disconnectedTestChannel { return &disconnectedTestChannel{} @@ -383,8 +383,7 @@ func (tc *sendErrorTestChannel) onRecv(_ context.Context) func() (*arrowpb.Batch } // connectErrorTestChannel returns an error from the ArrowTraces() call -type connectErrorTestChannel struct { -} +type connectErrorTestChannel struct{} func newConnectErrorTestChannel() *connectErrorTestChannel { return &connectErrorTestChannel{} diff --git a/exporter/otelarrowexporter/internal/arrow/exporter_test.go b/exporter/otelarrowexporter/internal/arrow/exporter_test.go index b722df561ddd..e03e1b145aef 100644 --- a/exporter/otelarrowexporter/internal/arrow/exporter_test.go +++ b/exporter/otelarrowexporter/internal/arrow/exporter_test.go @@ -41,9 +41,11 @@ var AllPrioritizers = []PrioritizerName{LeastLoadedPrioritizer, LeastLoadedTwoPr const defaultMaxStreamLifetime = 11 * time.Second -type compareJSONTraces struct{ ptrace.Traces } -type compareJSONMetrics struct{ pmetric.Metrics } -type compareJSONLogs struct{ plog.Logs } +type ( + compareJSONTraces struct{ ptrace.Traces } + compareJSONMetrics struct{ pmetric.Metrics } + compareJSONLogs struct{ plog.Logs } +) func (c compareJSONTraces) MarshalJSON() ([]byte, error) { var m ptrace.JSONMarshaler diff --git a/exporter/otelarrowexporter/metadata.go b/exporter/otelarrowexporter/metadata.go index 1d24bfc6cb81..6bd167624dfc 100644 --- a/exporter/otelarrowexporter/metadata.go +++ b/exporter/otelarrowexporter/metadata.go @@ -28,10 +28,8 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow/netstats" ) -var ( - // errTooManyExporters is returned when the MetadataCardinalityLimit has been reached. - errTooManyExporters = consumererror.NewPermanent(errors.New("too many exporter metadata-value combinations")) -) +// errTooManyExporters is returned when the MetadataCardinalityLimit has been reached. +var errTooManyExporters = consumererror.NewPermanent(errors.New("too many exporter metadata-value combinations")) type metadataExporter struct { config *Config diff --git a/exporter/prometheusexporter/README.md b/exporter/prometheusexporter/README.md index 3a102616c17c..82d10371d28f 100644 --- a/exporter/prometheusexporter/README.md +++ b/exporter/prometheusexporter/README.md @@ -6,7 +6,7 @@ | Stability | [beta]: metrics | | 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), [@dashpole](https://www.github.com/dashpole) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@Aneurysm9](https://www.github.com/Aneurysm9), [@dashpole](https://www.github.com/dashpole), [@ArthurSens](https://www.github.com/ArthurSens) | [beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta [core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol diff --git a/exporter/prometheusexporter/collector.go b/exporter/prometheusexporter/collector.go index 42035add2fbc..dd3891095473 100644 --- a/exporter/prometheusexporter/collector.go +++ b/exporter/prometheusexporter/collector.go @@ -22,9 +22,7 @@ import ( prometheustranslator "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus" ) -var ( - separatorString = string([]byte{model.SeparatorByte}) -) +var separatorString = string([]byte{model.SeparatorByte}) type collector struct { accumulator accumulator diff --git a/exporter/prometheusexporter/collector_test.go b/exporter/prometheusexporter/collector_test.go index f1b87d9fe10b..0552f2ec7135 100644 --- a/exporter/prometheusexporter/collector_test.go +++ b/exporter/prometheusexporter/collector_test.go @@ -220,7 +220,6 @@ func TestConvertDoubleHistogramExemplar(t *testing.T) { pMap := pcommon.NewMap() c := collector{ - accumulator: &mockAccumulator{ metrics: []pmetric.Metric{metric}, resourceAttributes: pMap, @@ -262,7 +261,6 @@ func TestConvertMonotonicSumExemplar(t *testing.T) { pMap := pcommon.NewMap() c := collector{ - accumulator: &mockAccumulator{ metrics: []pmetric.Metric{metric}, resourceAttributes: pMap, @@ -295,6 +293,7 @@ func (c *errorCheckCore) Check(ent zapcore.Entry, ce *zapcore.CheckedEntry) *zap } return ce } + func (c *errorCheckCore) Write(ent zapcore.Entry, _ []zapcore.Field) error { if ent.Level == zapcore.ErrorLevel { c.errorMessages = append(c.errorMessages, ent.Message) diff --git a/exporter/prometheusexporter/end_to_end_test.go b/exporter/prometheusexporter/end_to_end_test.go index c9ff88437140..f3d1b70899a4 100644 --- a/exporter/prometheusexporter/end_to_end_test.go +++ b/exporter/prometheusexporter/end_to_end_test.go @@ -33,7 +33,7 @@ func TestEndToEndSummarySupport(t *testing.T) { // 1. Create the Prometheus scrape endpoint. var wg sync.WaitGroup - var currentScrapeIndex = 0 + currentScrapeIndex := 0 wg.Add(1) // scrape one endpoint dropWizardServer := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, _ *http.Request) { diff --git a/exporter/prometheusexporter/go.mod b/exporter/prometheusexporter/go.mod index 76a0bd8629cb..84fb97e57444 100644 --- a/exporter/prometheusexporter/go.mod +++ b/exporter/prometheusexporter/go.mod @@ -10,7 +10,7 @@ require ( github.com/prometheus/client_golang v1.20.5 github.com/prometheus/client_model v0.6.1 github.com/prometheus/common v0.60.1 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 diff --git a/exporter/prometheusexporter/go.sum b/exporter/prometheusexporter/go.sum index b4634e110c34..0aeaa0c90308 100644 --- a/exporter/prometheusexporter/go.sum +++ b/exporter/prometheusexporter/go.sum @@ -536,8 +536,9 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/exporter/prometheusexporter/metadata.yaml b/exporter/prometheusexporter/metadata.yaml index 16e8e72fdd0e..624b14ed4308 100644 --- a/exporter/prometheusexporter/metadata.yaml +++ b/exporter/prometheusexporter/metadata.yaml @@ -8,7 +8,7 @@ status: - core - contrib codeowners: - active: [Aneurysm9, dashpole] + active: [Aneurysm9, dashpole, ArthurSens] tests: config: diff --git a/exporter/prometheusremotewriteexporter/README.md b/exporter/prometheusremotewriteexporter/README.md index 09a0f2feda7d..4357de6689de 100644 --- a/exporter/prometheusremotewriteexporter/README.md +++ b/exporter/prometheusremotewriteexporter/README.md @@ -6,7 +6,7 @@ | Stability | [beta]: metrics | | 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), [@dashpole](https://www.github.com/dashpole) | +| [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), [@dashpole](https://www.github.com/dashpole), [@ArthurSens](https://www.github.com/ArthurSens) | [beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta [core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol diff --git a/exporter/prometheusremotewriteexporter/exporter_test.go b/exporter/prometheusremotewriteexporter/exporter_test.go index a61a4474e842..5fbe3ef237ab 100644 --- a/exporter/prometheusremotewriteexporter/exporter_test.go +++ b/exporter/prometheusremotewriteexporter/exporter_test.go @@ -292,7 +292,8 @@ func Test_export(t *testing.T) { httpResponseCode int returnErrorOnCreate bool }{ - {"success_case", + { + "success_case", *ts1, true, http.StatusAccepted, @@ -304,7 +305,8 @@ func Test_export(t *testing.T) { false, http.StatusAccepted, true, - }, { + }, + { "error_status_code_case", *ts1, true, @@ -807,32 +809,38 @@ func Test_validateAndSanitizeExternalLabels(t *testing.T) { expectedLabels map[string]string returnErrorOnCreate bool }{ - {"success_case_no_labels", + { + "success_case_no_labels", map[string]string{}, map[string]string{}, false, }, - {"success_case_with_labels", + { + "success_case_with_labels", map[string]string{"key1": "val1"}, map[string]string{"key1": "val1"}, false, }, - {"success_case_2_with_labels", + { + "success_case_2_with_labels", map[string]string{"__key1__": "val1"}, map[string]string{"__key1__": "val1"}, false, }, - {"success_case_with_sanitized_labels", + { + "success_case_with_sanitized_labels", map[string]string{"__key1.key__": "val1"}, map[string]string{"__key1_key__": "val1"}, false, }, - {"labels_that_start_with_digit", + { + "labels_that_start_with_digit", map[string]string{"6key_": "val1"}, map[string]string{"key_6key_": "val1"}, false, }, - {"fail_case_empty_label", + { + "fail_case_empty_label", map[string]string{"": "val1"}, map[string]string{}, true, @@ -844,32 +852,38 @@ func Test_validateAndSanitizeExternalLabels(t *testing.T) { expectedLabels map[string]string returnErrorOnCreate bool }{ - {"success_case_no_labels", + { + "success_case_no_labels", map[string]string{}, map[string]string{}, false, }, - {"success_case_with_labels", + { + "success_case_with_labels", map[string]string{"key1": "val1"}, map[string]string{"key1": "val1"}, false, }, - {"success_case_2_with_labels", + { + "success_case_2_with_labels", map[string]string{"__key1__": "val1"}, map[string]string{"__key1__": "val1"}, false, }, - {"success_case_with_sanitized_labels", + { + "success_case_with_sanitized_labels", map[string]string{"__key1.key__": "val1"}, map[string]string{"__key1_key__": "val1"}, false, }, - {"labels_that_start_with_digit", + { + "labels_that_start_with_digit", map[string]string{"6key_": "val1"}, map[string]string{"key_6key_": "val1"}, false, }, - {"fail_case_empty_label", + { + "fail_case_empty_label", map[string]string{"": "val1"}, map[string]string{}, true, diff --git a/exporter/prometheusremotewriteexporter/factory.go b/exporter/prometheusremotewriteexporter/factory.go index 7820c7e8d335..46c52d233d91 100644 --- a/exporter/prometheusremotewriteexporter/factory.go +++ b/exporter/prometheusremotewriteexporter/factory.go @@ -35,7 +35,8 @@ func NewFactory() exporter.Factory { } func createMetricsExporter(ctx context.Context, set exporter.Settings, - cfg component.Config) (exporter.Metrics, error) { + cfg component.Config, +) (exporter.Metrics, error) { prwCfg, ok := cfg.(*Config) if !ok { return nil, errors.New("invalid configuration") diff --git a/exporter/prometheusremotewriteexporter/factory_test.go b/exporter/prometheusremotewriteexporter/factory_test.go index fdcf8fbfdea8..8196d5baaf8f 100644 --- a/exporter/prometheusremotewriteexporter/factory_test.go +++ b/exporter/prometheusremotewriteexporter/factory_test.go @@ -44,25 +44,29 @@ func Test_createMetricsExporter(t *testing.T) { returnErrorOnCreate bool returnErrorOnStart bool }{ - {"success_case", + { + "success_case", createDefaultConfig(), exportertest.NewNopSettings(), false, false, }, - {"fail_case", + { + "fail_case", nil, exportertest.NewNopSettings(), true, false, }, - {"invalid_config_case", + { + "invalid_config_case", invalidConfig, exportertest.NewNopSettings(), true, false, }, - {"invalid_tls_config_case", + { + "invalid_tls_config_case", invalidTLSConfig, exportertest.NewNopSettings(), false, diff --git a/exporter/prometheusremotewriteexporter/go.mod b/exporter/prometheusremotewriteexporter/go.mod index a3f2bf3f9f40..ca5226aac155 100644 --- a/exporter/prometheusremotewriteexporter/go.mod +++ b/exporter/prometheusremotewriteexporter/go.mod @@ -12,7 +12,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.114.0 github.com/prometheus/prometheus v0.54.1 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/tidwall/wal v1.1.8 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/exporter/prometheusremotewriteexporter/go.sum b/exporter/prometheusremotewriteexporter/go.sum index 8f18d0e92a23..1be0c97215b8 100644 --- a/exporter/prometheusremotewriteexporter/go.sum +++ b/exporter/prometheusremotewriteexporter/go.sum @@ -72,8 +72,8 @@ github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/exporter/prometheusremotewriteexporter/metadata.yaml b/exporter/prometheusremotewriteexporter/metadata.yaml index 5cb0de3750f7..9d9ab6f8bb2d 100644 --- a/exporter/prometheusremotewriteexporter/metadata.yaml +++ b/exporter/prometheusremotewriteexporter/metadata.yaml @@ -6,7 +6,7 @@ status: beta: [metrics] distributions: [core, contrib] codeowners: - active: [Aneurysm9, rapphil, dashpole] + active: [Aneurysm9, rapphil, dashpole, ArthurSens] tests: expect_consumer_error: true diff --git a/exporter/prometheusremotewriteexporter/testutil_test.go b/exporter/prometheusremotewriteexporter/testutil_test.go index eada2d8b30f6..02e1167164c3 100644 --- a/exporter/prometheusremotewriteexporter/testutil_test.go +++ b/exporter/prometheusremotewriteexporter/testutil_test.go @@ -321,7 +321,8 @@ func getExpHistogramMetric( } func getHistogramMetric(name string, attributes pcommon.Map, ts uint64, sum *float64, count uint64, bounds []float64, - buckets []uint64) pmetric.Metric { + buckets []uint64, +) pmetric.Metric { metric := pmetric.NewMetric() metric.SetName(name) metric.SetEmptyHistogram().SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) diff --git a/exporter/pulsarexporter/go.mod b/exporter/pulsarexporter/go.mod index 9dad746f467c..eb53ca644327 100644 --- a/exporter/pulsarexporter/go.mod +++ b/exporter/pulsarexporter/go.mod @@ -9,7 +9,7 @@ require ( github.com/jaegertracing/jaeger v1.62.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configopaque v1.20.0 diff --git a/exporter/pulsarexporter/go.sum b/exporter/pulsarexporter/go.sum index 08037081e1b6..f28ef506178d 100644 --- a/exporter/pulsarexporter/go.sum +++ b/exporter/pulsarexporter/go.sum @@ -203,8 +203,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/exporter/pulsarexporter/jaeger_marshaler.go b/exporter/pulsarexporter/jaeger_marshaler.go index 786140d2c67d..26f7e449e5da 100644 --- a/exporter/pulsarexporter/jaeger_marshaler.go +++ b/exporter/pulsarexporter/jaeger_marshaler.go @@ -51,8 +51,7 @@ type jaegerBatchMarshaler interface { encoding() string } -type jaegerProtoBatchMarshaler struct { -} +type jaegerProtoBatchMarshaler struct{} var _ jaegerBatchMarshaler = (*jaegerProtoBatchMarshaler)(nil) diff --git a/exporter/pulsarexporter/pulsar_exporter.go b/exporter/pulsarexporter/pulsar_exporter.go index 1dba74d2fb21..6d3b8aea956f 100644 --- a/exporter/pulsarexporter/pulsar_exporter.go +++ b/exporter/pulsarexporter/pulsar_exporter.go @@ -162,7 +162,6 @@ func newPulsarProducer(config Config) (pulsar.Client, pulsar.Producer, error) { options := config.clientOptions() client, err := pulsar.NewClient(options) - if err != nil { return nil, nil, err } @@ -170,7 +169,6 @@ func newPulsarProducer(config Config) (pulsar.Client, pulsar.Producer, error) { producerOptions := config.getProducerOptions() producer, err := client.CreateProducer(producerOptions) - if err != nil { return nil, nil, err } diff --git a/exporter/pulsarexporter/pulsar_exporter_test.go b/exporter/pulsarexporter/pulsar_exporter_test.go index 795cd0754fdd..0d37c4602367 100644 --- a/exporter/pulsarexporter/pulsar_exporter_test.go +++ b/exporter/pulsarexporter/pulsar_exporter_test.go @@ -94,7 +94,6 @@ func (c *mockProducer) Send(context.Context, *pulsar.ProducerMessage) (pulsar.Me } func (c *mockProducer) SendAsync(context.Context, *pulsar.ProducerMessage, func(pulsar.MessageID, *pulsar.ProducerMessage, error)) { - } func (c *mockProducer) LastSequenceID() int64 { diff --git a/exporter/rabbitmqexporter/go.mod b/exporter/rabbitmqexporter/go.mod index 1ba033b849e5..8504ac3f3fb6 100644 --- a/exporter/rabbitmqexporter/go.mod +++ b/exporter/rabbitmqexporter/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/rabbitmq v0.114.0 github.com/rabbitmq/amqp091-go v1.10.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.34.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/exporter/rabbitmqexporter/go.sum b/exporter/rabbitmqexporter/go.sum index e57ac7eb6a64..c817373455e5 100644 --- a/exporter/rabbitmqexporter/go.sum +++ b/exporter/rabbitmqexporter/go.sum @@ -120,8 +120,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/exporter/rabbitmqexporter/internal/publisher/publisher.go b/exporter/rabbitmqexporter/internal/publisher/publisher.go index 8a4ec63c688c..fa308b96b4fd 100644 --- a/exporter/rabbitmqexporter/internal/publisher/publisher.go +++ b/exporter/rabbitmqexporter/internal/publisher/publisher.go @@ -93,7 +93,6 @@ func (p *publisher) Publish(ctx context.Context, message Message) error { Body: message.Body, DeliveryMode: deliveryMode, }) - if err != nil { err = errors.Join(errors.New("error publishing message"), err) return err diff --git a/exporter/rabbitmqexporter/rabbitmq_exporter.go b/exporter/rabbitmqexporter/rabbitmq_exporter.go index d6f26d665d57..e7ae69ad8c3c 100644 --- a/exporter/rabbitmqexporter/rabbitmq_exporter.go +++ b/exporter/rabbitmqexporter/rabbitmq_exporter.go @@ -28,8 +28,10 @@ type rabbitmqExporter struct { publisher publisher.Publisher } -type publisherFactory = func(publisher.DialConfig) (publisher.Publisher, error) -type tlsFactory = func(context.Context) (*tls.Config, error) +type ( + publisherFactory = func(publisher.DialConfig) (publisher.Publisher, error) + tlsFactory = func(context.Context) (*tls.Config, error) +) func newRabbitmqExporter(cfg *Config, set component.TelemetrySettings, publisherFactory publisherFactory, tlsFactory tlsFactory, routingKey string, connectionName string) *rabbitmqExporter { exporter := &rabbitmqExporter{ diff --git a/exporter/rabbitmqexporter/rabbitmq_exporter_test.go b/exporter/rabbitmqexporter/rabbitmq_exporter_test.go index a5351c7c620d..76a9444ea0e7 100644 --- a/exporter/rabbitmqexporter/rabbitmq_exporter_test.go +++ b/exporter/rabbitmqexporter/rabbitmq_exporter_test.go @@ -29,7 +29,7 @@ func TestStartAndShutdown(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) pub := mockPublisher{} - var pubFactory = func(publisher.DialConfig) (publisher.Publisher, error) { + pubFactory := func(publisher.DialConfig) (publisher.Publisher, error) { return &pub, nil } exporter := newRabbitmqExporter(cfg, exportertest.NewNopSettings().TelemetrySettings, pubFactory, newTLSFactory(cfg), routingKey, connectionName) @@ -48,7 +48,7 @@ func TestStart_UnknownMarshallerEncoding(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) pub := mockPublisher{} - var pubFactory = func(publisher.DialConfig) (publisher.Publisher, error) { + pubFactory := func(publisher.DialConfig) (publisher.Publisher, error) { return &pub, nil } @@ -66,7 +66,7 @@ func TestStart_UnknownMarshallerEncoding(t *testing.T) { func TestStart_PublisherCreationErr(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) - var pubFactory = func(publisher.DialConfig) (publisher.Publisher, error) { + pubFactory := func(publisher.DialConfig) (publisher.Publisher, error) { return nil, errors.New("simulating error creating publisher") } exporter := newRabbitmqExporter(cfg, exportertest.NewNopSettings().TelemetrySettings, pubFactory, newTLSFactory(cfg), routingKey, connectionName) @@ -82,7 +82,7 @@ func TestStart_TLSError(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) pub := mockPublisher{} - var pubFactory = func(publisher.DialConfig) (publisher.Publisher, error) { + pubFactory := func(publisher.DialConfig) (publisher.Publisher, error) { return &pub, nil } tlsFactory := func(context.Context) (*tls.Config, error) { @@ -137,7 +137,7 @@ func exporterForPublishing(t *testing.T) (*mockPublisher, *rabbitmqExporter) { factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) pub := mockPublisher{} - var pubFactory = func(publisher.DialConfig) (publisher.Publisher, error) { + pubFactory := func(publisher.DialConfig) (publisher.Publisher, error) { return &pub, nil } exporter := newRabbitmqExporter(cfg, exportertest.NewNopSettings().TelemetrySettings, pubFactory, newTLSFactory(cfg), routingKey, connectionName) diff --git a/exporter/sapmexporter/config.go b/exporter/sapmexporter/config.go index b1f7993bcda8..90107d461f95 100644 --- a/exporter/sapmexporter/config.go +++ b/exporter/sapmexporter/config.go @@ -22,7 +22,6 @@ const ( // Config defines configuration for SAPM exporter. type Config struct { - // Endpoint is the destination to where traces will be sent to in SAPM format. // It must be a full URL and include the scheme, port and path e.g, https://ingest.signalfx.com/v2/trace Endpoint string `mapstructure:"endpoint"` diff --git a/exporter/sapmexporter/go.mod b/exporter/sapmexporter/go.mod index 9c2020db3388..777a1c8f06f4 100644 --- a/exporter/sapmexporter/go.mod +++ b/exporter/sapmexporter/go.mod @@ -10,7 +10,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.114.0 github.com/signalfx/sapm-proto v0.17.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/client v1.20.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/exporter/sapmexporter/go.sum b/exporter/sapmexporter/go.sum index 0caafa141f1f..92c4d44c148c 100644 --- a/exporter/sapmexporter/go.sum +++ b/exporter/sapmexporter/go.sum @@ -60,8 +60,8 @@ github.com/signalfx/sapm-proto v0.17.0 h1:KY+9zm/yDOq6uzaguI1RmrJcWxzbkGv0zE6Gpl github.com/signalfx/sapm-proto v0.17.0/go.mod h1:c8fGx9DjGP7Hqif7g6Zy6E+BCMXK/dERFU2b3faA0gk= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.111.0 h1:D3LJTYrrK2ac94E2PXPSbVkArqxbklbCLsE4MAJQdRo= diff --git a/exporter/sentryexporter/go.mod b/exporter/sentryexporter/go.mod index f7c112b941ab..ffdbd736de01 100644 --- a/exporter/sentryexporter/go.mod +++ b/exporter/sentryexporter/go.mod @@ -6,7 +6,7 @@ require ( github.com/getsentry/sentry-go v0.29.1 github.com/google/go-cmp v0.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/exporter/sentryexporter/go.sum b/exporter/sentryexporter/go.sum index ed061a9c2fae..99cc38528022 100644 --- a/exporter/sentryexporter/go.sum +++ b/exporter/sentryexporter/go.sum @@ -54,8 +54,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/exporter/signalfxexporter/dpclient.go b/exporter/signalfxexporter/dpclient.go index 27987171b854..cdb7338c1bf8 100644 --- a/exporter/signalfxexporter/dpclient.go +++ b/exporter/signalfxexporter/dpclient.go @@ -244,7 +244,6 @@ func (s *sfxDPClient) pushOTLPMetricsDataForToken(ctx context.Context, mh pmetri s.logger.Debug("Sending metrics in OTLP format") err = s.postData(ctx, body, headers) - if err != nil { return dataPointCount, consumererror.NewMetrics(err, mh) } @@ -256,7 +255,6 @@ func (s *sfxDPClient) encodeOTLPBody(md pmetric.Metrics) (bodyReader io.Reader, tr := pmetricotlp.NewExportRequestFromMetrics(md) body, err := tr.MarshalProto() - if err != nil { return nil, false, err } diff --git a/exporter/signalfxexporter/exporter.go b/exporter/signalfxexporter/exporter.go index 0fc908c149d4..eaa3fa361aa7 100644 --- a/exporter/signalfxexporter/exporter.go +++ b/exporter/signalfxexporter/exporter.go @@ -25,9 +25,7 @@ import ( metadata "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata" ) -var ( - errNotStarted = errors.New("exporter has not started") -) +var errNotStarted = errors.New("exporter has not started") // TODO: Find a place for this to be shared. type baseMetricsExporter struct { diff --git a/exporter/signalfxexporter/factory.go b/exporter/signalfxexporter/factory.go index 35c5428bb6af..65a3d891371e 100644 --- a/exporter/signalfxexporter/factory.go +++ b/exporter/signalfxexporter/factory.go @@ -133,7 +133,6 @@ func createMetricsExporter( exporterhelper.WithQueue(cfg.QueueSettings), exporterhelper.WithStart(exp.start), exporterhelper.WithShutdown(exp.shutdown)) - if err != nil { return nil, err } @@ -175,7 +174,6 @@ func createLogsExporter( exporterhelper.WithRetry(expCfg.BackOffConfig), exporterhelper.WithQueue(expCfg.QueueSettings), exporterhelper.WithStart(exp.startLogs)) - if err != nil { return nil, err } diff --git a/exporter/signalfxexporter/go.mod b/exporter/signalfxexporter/go.mod index 32eea82f2173..399a869a0947 100644 --- a/exporter/signalfxexporter/go.mod +++ b/exporter/signalfxexporter/go.mod @@ -16,7 +16,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.114.0 github.com/shirou/gopsutil/v4 v4.24.10 github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 diff --git a/exporter/signalfxexporter/go.sum b/exporter/signalfxexporter/go.sum index 72a2e1f4e1d5..f770b8897f73 100644 --- a/exporter/signalfxexporter/go.sum +++ b/exporter/signalfxexporter/go.sum @@ -91,8 +91,8 @@ 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/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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/exporter/signalfxexporter/internal/apm/correlations/client.go b/exporter/signalfxexporter/internal/apm/correlations/client.go index ba86baf9a6c2..95f418ee01ff 100644 --- a/exporter/signalfxexporter/internal/apm/correlations/client.go +++ b/exporter/signalfxexporter/internal/apm/correlations/client.go @@ -21,10 +21,12 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/requests/requestcounter" ) -var ErrChFull = errors.New("request channel full") -var errRetryChFull = errors.New("retry channel full") -var errMaxAttempts = errors.New("maximum attempts exceeded") -var errRequestCancelled = errors.New("request cancelled") +var ( + ErrChFull = errors.New("request channel full") + errRetryChFull = errors.New("retry channel full") + errMaxAttempts = errors.New("maximum attempts exceeded") + errRequestCancelled = errors.New("request cancelled") +) // ErrMaxEntries is an error returned when the correlation endpoint returns a 418 http status // code indicating that the set of services or environments is too large to add another value @@ -199,7 +201,8 @@ func (cc *Client) Correlate(cor *Correlation, cb CorrelateCB) { cor.Logger(cc.log).WithError(err).WithFields(log.Fields{"method": http.MethodPut}).Error("Unable to update dimension, not retrying") } cb(cor, err) - }}) + }, + }) if err != nil { cor.Logger(cc.log).WithError(err).WithFields(log.Fields{"method": http.MethodPut}).Debug("Unable to update dimension, not retrying") } @@ -223,7 +226,8 @@ func (cc *Client) Delete(cor *Correlation, callback SuccessfulDeleteCB) { default: cc.log.WithError(err).Error("Unable to update dimension, not retrying") } - }}) + }, + }) if err != nil { cor.Logger(cc.log).WithError(err).WithFields(log.Fields{"method": http.MethodDelete}).Debug("Unable to update dimension, not retrying") } @@ -243,7 +247,7 @@ func (cc *Client) Get(dimName string, dimValue string, callback SuccessfulGetCB) callback: func(body []byte, statuscode int, err error) { switch statuscode { case http.StatusOK: - var response = map[string][]string{} + response := map[string][]string{} err = json.Unmarshal(body, &response) if err != nil { cc.log.WithError(err).WithFields(log.Fields{"dim": dimName, "value": dimValue}).Error("Unable to unmarshall correlations for dimension") diff --git a/exporter/signalfxexporter/internal/apm/correlations/client_test.go b/exporter/signalfxexporter/internal/apm/correlations/client_test.go index 023ddbbe9320..95d737f280f3 100644 --- a/exporter/signalfxexporter/internal/apm/correlations/client_test.go +++ b/exporter/signalfxexporter/internal/apm/correlations/client_test.go @@ -24,9 +24,11 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter/internal/apm/log" ) -var getPathRegexp = regexp.MustCompile(`/v2/apm/correlate/([^/]+)/([^/]+)`) // /dimName/dimVal -var putPathRegexp = regexp.MustCompile(`/v2/apm/correlate/([^/]+)/([^/]+)/([^/]+)`) // /dimName/dimVal/{service,environment} -var deletePathRegexp = regexp.MustCompile(`/v2/apm/correlate/([^/]+)/([^/]+)/([^/]+)/([^/]+)`) // /dimName/dimValue/{service,environment}/value +var ( + getPathRegexp = regexp.MustCompile(`/v2/apm/correlate/([^/]+)/([^/]+)`) // /dimName/dimVal + putPathRegexp = regexp.MustCompile(`/v2/apm/correlate/([^/]+)/([^/]+)/([^/]+)`) // /dimName/dimVal/{service,environment} + deletePathRegexp = regexp.MustCompile(`/v2/apm/correlate/([^/]+)/([^/]+)/([^/]+)/([^/]+)`) // /dimName/dimValue/{service,environment}/value +) func waitForCors(corCh <-chan *request, count, waitSeconds int) []*request { // nolint: unparam cors := make([]*request, 0, count) diff --git a/exporter/signalfxexporter/internal/apm/correlations/dedup.go b/exporter/signalfxexporter/internal/apm/correlations/dedup.go index 2e5d7e9c0388..28e26dc483fe 100644 --- a/exporter/signalfxexporter/internal/apm/correlations/dedup.go +++ b/exporter/signalfxexporter/internal/apm/correlations/dedup.go @@ -21,7 +21,7 @@ type deduplicator struct { } func (d *deduplicator) purgeCreates() { - var elem = d.pendingCreates.Front() + elem := d.pendingCreates.Front() for { if elem == nil { return @@ -38,7 +38,7 @@ func (d *deduplicator) purgeCreates() { } func (d *deduplicator) purgeDeletes() { - var elem = d.pendingDeletes.Front() + elem := d.pendingDeletes.Front() for { if elem == nil { return @@ -60,7 +60,7 @@ func (d *deduplicator) purge() { } func (d *deduplicator) evictPendingDelete() { - var elem = d.pendingDeletes.Back() + elem := d.pendingDeletes.Back() if elem != nil { req, ok := elem.Value.(*request) if ok { @@ -72,7 +72,7 @@ func (d *deduplicator) evictPendingDelete() { } func (d *deduplicator) evictPendingCreate() { - var elem = d.pendingCreates.Back() + elem := d.pendingCreates.Back() if elem != nil { req, ok := elem.Value.(*request) if ok { diff --git a/exporter/signalfxexporter/internal/apm/log/log.go b/exporter/signalfxexporter/internal/apm/log/log.go index 0924d8ce955a..3709ddd5d72b 100644 --- a/exporter/signalfxexporter/internal/apm/log/log.go +++ b/exporter/signalfxexporter/internal/apm/log/log.go @@ -7,8 +7,7 @@ package log // import "github.com/open-telemetry/opentelemetry-collector-contrib // Fields is a map that is used to populated logging context. type Fields map[string]any -type nilLogger struct { -} +type nilLogger struct{} func (n nilLogger) Debug(string) { } diff --git a/exporter/signalfxexporter/internal/apm/requests/requestcounter/counter.go b/exporter/signalfxexporter/internal/apm/requests/requestcounter/counter.go index ca7d597eb426..bdadb51de0cb 100644 --- a/exporter/signalfxexporter/internal/apm/requests/requestcounter/counter.go +++ b/exporter/signalfxexporter/internal/apm/requests/requestcounter/counter.go @@ -17,9 +17,11 @@ const ( resetRequestCountKey key = 3 ) -type getRequestCount func() uint32 -type incrementRequestCount func() -type resetRequestCount func() +type ( + getRequestCount func() uint32 + incrementRequestCount func() + resetRequestCount func() +) // checks if a counter already exists on the context func counterExists(ctx context.Context) (exists bool) { diff --git a/exporter/signalfxexporter/internal/apm/requests/sender.go b/exporter/signalfxexporter/internal/apm/requests/sender.go index 708f00571655..93d691ff1167 100644 --- a/exporter/signalfxexporter/internal/apm/requests/sender.go +++ b/exporter/signalfxexporter/internal/apm/requests/sender.go @@ -99,11 +99,15 @@ func (rs *ReqSender) sendRequest(req *http.Request) error { type key int -const RequestFailedCallbackKey key = 1 -const RequestSuccessCallbackKey key = 2 +const ( + RequestFailedCallbackKey key = 1 + RequestSuccessCallbackKey key = 2 +) -type RequestFailedCallback func(body []byte, statusCode int, err error) -type RequestSuccessCallback func([]byte) +type ( + RequestFailedCallback func(body []byte, statusCode int, err error) + RequestSuccessCallback func([]byte) +) func onRequestSuccess(req *http.Request, body []byte) { ctx := req.Context() @@ -113,6 +117,7 @@ func onRequestSuccess(req *http.Request, body []byte) { } cb(body) } + func onRequestFailed(req *http.Request, body []byte, statusCode int, err error) { ctx := req.Context() cb, ok := ctx.Value(RequestFailedCallbackKey).(RequestFailedCallback) @@ -124,7 +129,6 @@ func onRequestFailed(req *http.Request, body []byte, statusCode int, err error) func sendRequest(client *http.Client, req *http.Request) ([]byte, int, error) { resp, err := client.Do(req) - if err != nil { return nil, 0, err } diff --git a/exporter/signalfxexporter/internal/apm/tracetracker/tracker_test.go b/exporter/signalfxexporter/internal/apm/tracetracker/tracker_test.go index 6b69551abfa1..24a366de1727 100644 --- a/exporter/signalfxexporter/internal/apm/tracetracker/tracker_test.go +++ b/exporter/signalfxexporter/internal/apm/tracetracker/tracker_test.go @@ -96,6 +96,7 @@ func (c *correlationTestClient) Get(_ string, dimValue string, cb correlations.S } }() } + func (c *correlationTestClient) Correlate(cl *correlations.Correlation, cb correlations.CorrelateCB) { c.Lock() defer c.Unlock() @@ -103,6 +104,7 @@ func (c *correlationTestClient) Correlate(cl *correlations.Correlation, cb corre cb(cl, nil) atomic.AddInt64(&c.correlateCounter, 1) } + func (c *correlationTestClient) Delete(cl *correlations.Correlation, cb correlations.SuccessfulDeleteCB) { c.Lock() defer c.Unlock() @@ -110,6 +112,7 @@ func (c *correlationTestClient) Delete(cl *correlations.Correlation, cb correlat cb(cl) atomic.AddInt64(&c.deleteCounter, 1) } + func (c *correlationTestClient) getCorrelations() []*correlations.Correlation { c.Lock() defer c.Unlock() diff --git a/exporter/signalfxexporter/internal/correlation/correlation.go b/exporter/signalfxexporter/internal/correlation/correlation.go index eb2df4fb27b0..5b3ac9c66fde 100644 --- a/exporter/signalfxexporter/internal/correlation/correlation.go +++ b/exporter/signalfxexporter/internal/correlation/correlation.go @@ -68,7 +68,6 @@ func newCorrelationClient(ctx context.Context, cfg *Config, accessToken configop AccessToken: string(accessToken), URL: corrURL, }) - if err != nil { cancel() return nil, fmt.Errorf("failed to create correlation client: %w", err) diff --git a/exporter/signalfxexporter/internal/dimensions/dimclient.go b/exporter/signalfxexporter/internal/dimensions/dimclient.go index ff0337767d3b..71e6dd00ca9a 100644 --- a/exporter/signalfxexporter/internal/dimensions/dimclient.go +++ b/exporter/signalfxexporter/internal/dimensions/dimclient.go @@ -230,7 +230,6 @@ func (dc *DimensionClient) handleDimensionUpdate(ctx context.Context, dimUpdate ) req, err = dc.makePatchRequest(ctx, dimUpdate) - if err != nil { return err } diff --git a/exporter/signalfxexporter/internal/dimensions/metadata.go b/exporter/signalfxexporter/internal/dimensions/metadata.go index 188fb4047872..9ccf16933abe 100644 --- a/exporter/signalfxexporter/internal/dimensions/metadata.go +++ b/exporter/signalfxexporter/internal/dimensions/metadata.go @@ -20,7 +20,8 @@ type MetadataUpdateClient interface { func getDimensionUpdateFromMetadata( metadata metadata.MetadataUpdate, - metricsConverter translation.MetricsConverter) *DimensionUpdate { + metricsConverter translation.MetricsConverter, +) *DimensionUpdate { properties, tags := getPropertiesAndTags(metadata) return &DimensionUpdate{ diff --git a/exporter/signalfxexporter/internal/dimensions/requests.go b/exporter/signalfxexporter/internal/dimensions/requests.go index f2f7277200fe..4722f063d0e6 100644 --- a/exporter/signalfxexporter/internal/dimensions/requests.go +++ b/exporter/signalfxexporter/internal/dimensions/requests.go @@ -22,7 +22,8 @@ type ReqSender struct { } func NewReqSender(client *http.Client, - workerCount uint, diagnosticDimensions map[string]string) *ReqSender { + workerCount uint, diagnosticDimensions map[string]string, +) *ReqSender { return &ReqSender{ client: client, additionalDimensions: diagnosticDimensions, @@ -94,11 +95,15 @@ func (rs *ReqSender) sendRequest(req *http.Request) error { type key int -const RequestFailedCallbackKey key = 1 -const RequestSuccessCallbackKey key = 2 +const ( + RequestFailedCallbackKey key = 1 + RequestSuccessCallbackKey key = 2 +) -type RequestFailedCallback func(statusCode int, err error) -type RequestSuccessCallback func([]byte) +type ( + RequestFailedCallback func(statusCode int, err error) + RequestSuccessCallback func([]byte) +) func onRequestSuccess(req *http.Request, body []byte) { ctx := req.Context() @@ -108,6 +113,7 @@ func onRequestSuccess(req *http.Request, body []byte) { } cb(body) } + func onRequestFailed(req *http.Request, statusCode int, err error) { ctx := req.Context() cb, ok := ctx.Value(RequestFailedCallbackKey).(RequestFailedCallback) @@ -119,7 +125,6 @@ func onRequestFailed(req *http.Request, statusCode int, err error) { func sendRequest(client *http.Client, req *http.Request) ([]byte, int, error) { resp, err := client.Do(req) - if err != nil { return nil, 0, err } diff --git a/exporter/signalfxexporter/internal/hostmetadata/host.go b/exporter/signalfxexporter/internal/hostmetadata/host.go index a9150b4a4c6c..2e9558f41800 100644 --- a/exporter/signalfxexporter/internal/hostmetadata/host.go +++ b/exporter/signalfxexporter/internal/hostmetadata/host.go @@ -32,10 +32,12 @@ var etcPath = func() string { const cpuStatsTimeout = 10 * time.Second // Map library functions to unexported package variables for testing purposes. -var cpuInfo = cpu.InfoWithContext -var cpuCounts = cpu.CountsWithContext -var memVirtualMemory = mem.VirtualMemory -var hostInfo = host.Info +var ( + cpuInfo = cpu.InfoWithContext + cpuCounts = cpu.CountsWithContext + memVirtualMemory = mem.VirtualMemory + hostInfo = host.Info +) // hostCPU information about the host type hostCPU struct { @@ -179,7 +181,7 @@ func getMemory() (*Memory, error) { func getStringFromFile(pattern string, path string) (string, error) { var err error var file []byte - var reg = regexp.MustCompile(pattern) + reg := regexp.MustCompile(pattern) if file, err = os.ReadFile(path); err == nil { if match := reg.FindSubmatch(file); len(match) > 1 { return string(match[1]), nil diff --git a/exporter/signalfxexporter/internal/hostmetadata/host_linux_test.go b/exporter/signalfxexporter/internal/hostmetadata/host_linux_test.go index 5b662cfdcdf1..6e90c1304f2a 100644 --- a/exporter/signalfxexporter/internal/hostmetadata/host_linux_test.go +++ b/exporter/signalfxexporter/internal/hostmetadata/host_linux_test.go @@ -32,11 +32,13 @@ func TestFillOSSpecificData(t *testing.T) { args: args{ etc: "./testdata/lsb-release", syscallUname: func(in *unix.Utsname) error { - in.Version = [65]byte{35, 57, 45, 85, 98, 117, 110, 116, + in.Version = [65]byte{ + 35, 57, 45, 85, 98, 117, 110, 116, 117, 32, 83, 77, 80, 32, 87, 101, 100, 32, 77, 97, 121, 32, 49, 54, 32, 49, 53, 58, 50, 50, 58, 53, 52, 32, 85, - 84, 67, 32, 50, 48, 49, 56} + 84, 67, 32, 50, 48, 49, 56, + } return nil }, }, diff --git a/exporter/signalfxexporter/internal/translation/converter.go b/exporter/signalfxexporter/internal/translation/converter.go index ffc5e91e1d18..27d1930fa51f 100644 --- a/exporter/signalfxexporter/internal/translation/converter.go +++ b/exporter/signalfxexporter/internal/translation/converter.go @@ -49,7 +49,8 @@ func NewMetricsConverter( includes []dpfilters.MetricFilter, nonAlphanumericDimChars string, dropHistogramBuckets bool, - processHistograms bool) (*MetricsConverter, error) { + processHistograms bool, +) (*MetricsConverter, error) { fs, err := dpfilters.NewFilterSet(excludes, includes) if err != nil { return nil, err diff --git a/exporter/signalfxexporter/internal/translation/dpfilters/filterset_test.go b/exporter/signalfxexporter/internal/translation/dpfilters/filterset_test.go index 64293030ee2c..4125c7f45335 100644 --- a/exporter/signalfxexporter/internal/translation/dpfilters/filterset_test.go +++ b/exporter/signalfxexporter/internal/translation/dpfilters/filterset_test.go @@ -101,7 +101,8 @@ func TestFilterSet(t *testing.T) { excludes: []MetricFilter{{ Dimensions: map[string]any{ "container_name": "PO", - }}}, + }, + }}, expectedMatches: []*sfxpb.DataPoint{ { Metric: "cpu.utilization", @@ -120,7 +121,8 @@ func TestFilterSet(t *testing.T) { excludes: []MetricFilter{{ Dimensions: map[string]any{ "container_name": []any{"PO"}, - }}}, + }, + }}, expectedMatches: []*sfxpb.DataPoint{ { Metric: "cpu.utilization", @@ -139,7 +141,8 @@ func TestFilterSet(t *testing.T) { excludes: []MetricFilter{{ Dimensions: map[string]any{ "container_name": []any{`/^[A-Z][A-Z]$/`}, - }}}, + }, + }}, expectedMatches: []*sfxpb.DataPoint{ { Metric: "cpu.utilization", @@ -158,7 +161,8 @@ func TestFilterSet(t *testing.T) { excludes: []MetricFilter{{ Dimensions: map[string]any{ "container_name": []any{`/.+/`}, - }}}, + }, + }}, expectedMatches: []*sfxpb.DataPoint{ { Metric: "cpu.utilization", @@ -177,7 +181,8 @@ func TestFilterSet(t *testing.T) { excludes: []MetricFilter{{ Dimensions: map[string]any{ "container_name": []any{`*O*`}, - }}}, + }, + }}, expectedMatches: []*sfxpb.DataPoint{ { Metric: "cpu.utilization", @@ -234,7 +239,8 @@ func TestFilterSet(t *testing.T) { excludes: []MetricFilter{{ Dimensions: map[string]any{ "container_name": []any{"mycontainer"}, - }}}, + }, + }}, expectedNonMatches: []*sfxpb.DataPoint{ { Metric: "cpu.utilization", @@ -247,7 +253,8 @@ func TestFilterSet(t *testing.T) { Dimensions: map[string]any{ "host": []any{"localhost"}, "system": []any{"r4"}, - }}}, + }, + }}, expectedNonMatches: []*sfxpb.DataPoint{ { Metric: "cpu.utilization", @@ -266,7 +273,8 @@ func TestFilterSet(t *testing.T) { Dimensions: map[string]any{ "host": []any{"localhost"}, "system": []any{"r4"}, - }}}, + }, + }}, expectedMatches: []*sfxpb.DataPoint{ { Metric: "cpu.utilization", @@ -282,7 +290,8 @@ func TestFilterSet(t *testing.T) { Dimensions: map[string]any{ "host": []any{"localhost"}, "system": []any{"r4"}, - }}}, + }, + }}, expectedMatches: []*sfxpb.DataPoint{ { Metric: "cpu.utilization", @@ -307,7 +316,8 @@ func TestFilterSet(t *testing.T) { excludes: []MetricFilter{{ Dimensions: map[string]any{ "container_name": []any{"*", "!pause", "!/.*idle/"}, - }}}, + }, + }}, expectedMatches: []*sfxpb.DataPoint{ { Metric: "cpu.utilization", @@ -345,7 +355,8 @@ func TestFilterSet(t *testing.T) { excludes: []MetricFilter{{ Dimensions: map[string]any{ "dim": []any{}, - }}}, + }, + }}, wantErr: true, wantErrMsg: "string map value in filter cannot be empty", }, @@ -360,7 +371,8 @@ func TestFilterSet(t *testing.T) { excludes: []MetricFilter{{ Dimensions: map[string]any{ "container_name": []any{"cpu.*["}, - }}}, + }, + }}, wantErr: true, wantErrMsg: "unexpected end of input", }, @@ -369,7 +381,8 @@ func TestFilterSet(t *testing.T) { excludes: []MetricFilter{{ Dimensions: map[string]any{ "host": 1, - }}}, + }, + }}, wantErr: true, wantErrMsg: "1 should be either a string or string list", }, diff --git a/exporter/signalfxexporter/internal/translation/dpfilters/string.go b/exporter/signalfxexporter/internal/translation/dpfilters/string.go index ee971708cd8f..093139ef8198 100644 --- a/exporter/signalfxexporter/internal/translation/dpfilters/string.go +++ b/exporter/signalfxexporter/internal/translation/dpfilters/string.go @@ -33,7 +33,6 @@ func NewStringFilter(items []string) (*StringFilter, error) { reText := stripSlashes(m) re, err = regexp.Compile(reText) - if err != nil { return nil, err } diff --git a/exporter/signalfxexporter/internal/translation/translator.go b/exporter/signalfxexporter/internal/translation/translator.go index 6c54e10c12f1..324188e820ee 100644 --- a/exporter/signalfxexporter/internal/translation/translator.go +++ b/exporter/signalfxexporter/internal/translation/translator.go @@ -748,7 +748,7 @@ func aggregateDatapoints( // generate map keys. func stringifyDimensions(dimensions []*sfxpb.Dimension, exclusions []string) string { const aggregationKeyDelimiter = "//" - var aggregationKeyParts = make([]string, 0, len(dimensions)) + aggregationKeyParts := make([]string, 0, len(dimensions)) for _, d := range dimensions { if !dimensionIn(d, exclusions) { aggregationKeyParts = append(aggregationKeyParts, fmt.Sprintf("%s:%s", d.Key, d.Value)) @@ -823,7 +823,7 @@ func convertMetricValue(logger *zap.Logger, dp *sfxpb.DataPoint, newType MetricV zap.String("metric", dp.Metric)) return } - var intVal = int64(*val) + intVal := int64(*val) dp.Value = sfxpb.Datum{IntValue: &intVal} case MetricValueTypeDouble: val := dp.GetValue().IntValue @@ -832,7 +832,7 @@ func convertMetricValue(logger *zap.Logger, dp *sfxpb.DataPoint, newType MetricV zap.String("metric", dp.Metric)) return } - var floatVal = float64(*val) + floatVal := float64(*val) dp.Value = sfxpb.Datum{DoubleValue: &floatVal} } } @@ -869,7 +869,8 @@ func dropDimensions(dp *sfxpb.DataPoint, rule Rule) { func filterDimensionsByValues( dimensions []*sfxpb.Dimension, - dimensionPairs map[string]map[string]bool) []*sfxpb.Dimension { + dimensionPairs map[string]map[string]bool, +) []*sfxpb.Dimension { if len(dimensions) == 0 { return nil } diff --git a/exporter/signalfxexporter/internal/translation/translator_test.go b/exporter/signalfxexporter/internal/translation/translator_test.go index 23e13981f9f0..23fa4194074f 100644 --- a/exporter/signalfxexporter/internal/translation/translator_test.go +++ b/exporter/signalfxexporter/internal/translation/translator_test.go @@ -553,8 +553,10 @@ func TestNewMetricTranslator(t *testing.T) { } } -var msec = time.Now().Unix() * 1e3 -var gaugeType = sfxpb.MetricType_GAUGE +var ( + msec = time.Now().Unix() * 1e3 + gaugeType = sfxpb.MetricType_GAUGE +) func TestTranslateDataPoints(t *testing.T) { tests := []struct { @@ -2395,12 +2397,12 @@ func TestCalculateNewMetric_Double(t *testing.T) { } func generateIntPtr(i int) *int64 { - var iPtr = int64(i) + iPtr := int64(i) return &iPtr } func generateFloatPtr(i float64) *float64 { - var iPtr = i + iPtr := i return &iPtr } @@ -2884,7 +2886,8 @@ func TestDropDimensions(t *testing.T) { }, }, }, - }, { + }, + { name: "No op when dimensions do not exist on dp", rules: []Rule{ { diff --git a/exporter/signalfxexporter/internal/utils/histogram_utils_test.go b/exporter/signalfxexporter/internal/utils/histogram_utils_test.go index 03d7f366a2c9..3a2426968ee3 100644 --- a/exporter/signalfxexporter/internal/utils/histogram_utils_test.go +++ b/exporter/signalfxexporter/internal/utils/histogram_utils_test.go @@ -220,7 +220,8 @@ func TestHistogramsAreRetrieved(t *testing.T) { ilm1.Metrics().AppendEmpty() buildHistogram(ilm1.Metrics().At(1), "histogram_2_s2", ts, 2) return out - }}, + }, + }, { name: "mixed_type_multiple_resources", inMetricsFunc: func() pmetric.Metrics { @@ -292,7 +293,8 @@ func TestHistogramsAreRetrieved(t *testing.T) { buildHistogram(ilm0r1.Metrics().At(0), "histogram_s0_r2", ts, 1) return out - }}, + }, + }, { name: "remove_access_token", inMetricsFunc: func() pmetric.Metrics { diff --git a/exporter/splunkhecexporter/buffer.go b/exporter/splunkhecexporter/buffer.go index 0a10a973783f..8c134043614b 100644 --- a/exporter/splunkhecexporter/buffer.go +++ b/exporter/splunkhecexporter/buffer.go @@ -11,9 +11,7 @@ import ( "sync" ) -var ( - errOverCapacity = errors.New("over capacity") -) +var errOverCapacity = errors.New("over capacity") type buffer interface { io.Writer diff --git a/exporter/splunkhecexporter/client.go b/exporter/splunkhecexporter/client.go index 8cf5747cd41f..70e2e11bb659 100644 --- a/exporter/splunkhecexporter/client.go +++ b/exporter/splunkhecexporter/client.go @@ -154,9 +154,11 @@ func (c *client) pushLogData(ctx context.Context, ld plog.Logs) error { // A guesstimated value > length of bytes of a single event. // Added to buffer capacity so that buffer is likely to grow by reslicing when buf.Len() > bufCap. -const bufCapPadding = uint(4096) -const libraryHeaderName = "X-Splunk-Instrumentation-Library" -const profilingLibraryName = "otel.profiling" +const ( + bufCapPadding = uint(4096) + libraryHeaderName = "X-Splunk-Instrumentation-Library" + profilingLibraryName = "otel.profiling" +) func isProfilingData(sl plog.ScopeLogs) bool { return sl.Scope().Name() == profilingLibraryName diff --git a/exporter/splunkhecexporter/client_test.go b/exporter/splunkhecexporter/client_test.go index 5cdaf73a90ae..0f4ccd1e349f 100644 --- a/exporter/splunkhecexporter/client_test.go +++ b/exporter/splunkhecexporter/client_test.go @@ -132,7 +132,7 @@ func createLogData(numResources int, numLibraries int, numRecords int) plog.Logs } func repeat(what int, times int) []int { - var result = make([]int, times) + result := make([]int, times) for i := range result { result[i] = what } @@ -397,10 +397,12 @@ func TestReceiveTracesBatches(t *testing.T) { }(), want: wantType{ batches: [][]string{ - {`"start_time":1`, + { + `"start_time":1`, `"start_time":2`, `start_time":3`, - `start_time":4`}, + `start_time":4`, + }, }, numBatches: 1, }, @@ -570,10 +572,12 @@ func TestReceiveLogs(t *testing.T) { }(), want: wantType{ batches: [][]string{ - {`"otel.log.name":"0_0_0"`, + { + `"otel.log.name":"0_0_0"`, `"otel.log.name":"0_0_1"`, `otel.log.name":"0_0_2`, - `otel.log.name":"0_0_3`}, + `otel.log.name":"0_0_3`, + }, }, numBatches: 1, }, diff --git a/exporter/splunkhecexporter/factory.go b/exporter/splunkhecexporter/factory.go index 8d806de5e7b5..a5d82775b28e 100644 --- a/exporter/splunkhecexporter/factory.go +++ b/exporter/splunkhecexporter/factory.go @@ -129,7 +129,6 @@ func createTracesExporter( exporterhelper.WithShutdown(c.stop), exporterhelper.WithBatcher(cfg.BatcherConfig), ) - if err != nil { return nil, err } @@ -198,7 +197,6 @@ func createLogsExporter( exporterhelper.WithShutdown(c.stop), exporterhelper.WithBatcher(cfg.BatcherConfig), ) - if err != nil { return nil, err } diff --git a/exporter/splunkhecexporter/go.mod b/exporter/splunkhecexporter/go.mod index 574ae4a3df58..3b98a0a9c31a 100644 --- a/exporter/splunkhecexporter/go.mod +++ b/exporter/splunkhecexporter/go.mod @@ -10,7 +10,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.34.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/exporter/splunkhecexporter/go.sum b/exporter/splunkhecexporter/go.sum index fc9800ce2480..6b4155fff081 100644 --- a/exporter/splunkhecexporter/go.sum +++ b/exporter/splunkhecexporter/go.sum @@ -128,8 +128,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/exporter/splunkhecexporter/integration_test.go b/exporter/splunkhecexporter/integration_test.go index d04d429136d0..288ffd2435d2 100644 --- a/exporter/splunkhecexporter/integration_test.go +++ b/exporter/splunkhecexporter/integration_test.go @@ -105,7 +105,7 @@ func startSplunk() SplunkContainerConfig { { HostFilePath: filepath.Join("testdata", "splunk.yaml"), ContainerFilePath: "/tmp/defaults/default.yml", - FileMode: 0644, + FileMode: 0o644, }, }, WaitingFor: wait.ForHealthCheck().WithStartupTimeout(5 * time.Minute), @@ -115,7 +115,6 @@ func startSplunk() SplunkContainerConfig { ContainerRequest: req, Started: true, }) - if err != nil { logger.Info("Error while creating container") panic(err) @@ -223,9 +222,11 @@ type cfg struct { type telemetryType string -var metricsType = telemetryType("metrics") -var logsType = telemetryType("logs") -var tracesType = telemetryType("traces") +var ( + metricsType = telemetryType("metrics") + logsType = telemetryType("logs") + tracesType = telemetryType("traces") +) type testCfg struct { name string diff --git a/exporter/splunkhecexporter/internal/integrationtestutils/config_helper.go b/exporter/splunkhecexporter/internal/integrationtestutils/config_helper.go index 651b52929714..86c0685e4c4d 100644 --- a/exporter/splunkhecexporter/internal/integrationtestutils/config_helper.go +++ b/exporter/splunkhecexporter/internal/integrationtestutils/config_helper.go @@ -102,7 +102,7 @@ func SetConfigVariable(key string, value string) { } // Write yaml file - err = os.WriteFile(configFilePth, newData, 0600) + err = os.WriteFile(configFilePth, newData, 0o600) if err != nil { fmt.Printf("Error writing file: %v", err) return diff --git a/exporter/splunkhecexporter/internal/integrationtestutils/splunk.go b/exporter/splunkhecexporter/internal/integrationtestutils/splunk.go index 2ef7f21d7b4d..36199d2abd4a 100644 --- a/exporter/splunkhecexporter/internal/integrationtestutils/splunk.go +++ b/exporter/splunkhecexporter/internal/integrationtestutils/splunk.go @@ -115,6 +115,7 @@ func checkSearchJobStatusCode(user string, password string, baseURL string, jobI 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 { logger := log.New(os.Stdout, "", log.LstdFlags) searchURL := fmt.Sprintf("%s/services/search/jobs?output_mode=json", baseURL) diff --git a/exporter/splunkhecexporter/tracedata_to_splunk_test.go b/exporter/splunkhecexporter/tracedata_to_splunk_test.go index 377970076f19..491d66147771 100644 --- a/exporter/splunkhecexporter/tracedata_to_splunk_test.go +++ b/exporter/splunkhecexporter/tracedata_to_splunk_test.go @@ -122,7 +122,8 @@ func commonSplunkEvent( Source: "myservice", SourceType: "mysourcetype", Index: "myindex", - Event: hecSpan{Name: name, StartTime: ts, + Event: hecSpan{ + Name: name, StartTime: ts, TraceID: "", SpanID: "", ParentSpan: "", diff --git a/exporter/sumologicexporter/go.mod b/exporter/sumologicexporter/go.mod index 32c88091dd6a..be3d3f2eed19 100644 --- a/exporter/sumologicexporter/go.mod +++ b/exporter/sumologicexporter/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/klauspost/compress v1.17.11 github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configauth v0.114.0 @@ -50,7 +50,6 @@ require ( github.com/knadh/koanf/v2 v2.1.2 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/go-ps v1.0.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 diff --git a/exporter/sumologicexporter/go.sum b/exporter/sumologicexporter/go.sum index feba1903dbfb..940c3a91f6e5 100644 --- a/exporter/sumologicexporter/go.sum +++ b/exporter/sumologicexporter/go.sum @@ -52,8 +52,6 @@ github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ 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-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -75,8 +73,8 @@ github.com/shirou/gopsutil/v4 v4.24.10 h1:7VOzPtfw/5YDU+jLEoBwXwxJbQetULywoSV4RY github.com/shirou/gopsutil/v4 v4.24.10/go.mod h1:s4D/wg+ag4rG0WO7AiTj2BeYCRhym0vM7DHbZRxnIT8= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/exporter/sumologicexporter/sender.go b/exporter/sumologicexporter/sender.go index 8e8d0a82b9ce..d52cfcbcdb3f 100644 --- a/exporter/sumologicexporter/sender.go +++ b/exporter/sumologicexporter/sender.go @@ -354,7 +354,6 @@ func (s *sender) logToJSON(record plog.LogRecord) (string, error) { enc := json.NewEncoder(nextLine) enc.SetEscapeHTML(false) err := enc.Encode(recordCopy.Attributes().AsRaw()) - if err != nil { return "", err } @@ -700,6 +699,7 @@ func (s *sender) addRequestHeaders(req *http.Request, pipeline PipelineType, fld } return nil } + func (s *sender) recordMetrics(duration time.Duration, count int64, req *http.Request, resp *http.Response, pipeline PipelineType) { statusCode := 0 diff --git a/exporter/syslogexporter/exporter_test.go b/exporter/syslogexporter/exporter_test.go index 1a42396c66a9..3fc4691379a3 100644 --- a/exporter/syslogexporter/exporter_test.go +++ b/exporter/syslogexporter/exporter_test.go @@ -24,8 +24,10 @@ import ( "go.uber.org/zap" ) -var expectedForm = "<165>1 2003-08-24T12:14:15Z 192.0.2.1 myproc 8710 - - It's time to make the do-nuts.\n" -var originalForm = "<165>1 2003-08-24T05:14:15-07:00 192.0.2.1 myproc 8710 - - It's time to make the do-nuts." +var ( + expectedForm = "<165>1 2003-08-24T12:14:15Z 192.0.2.1 myproc 8710 - - It's time to make the do-nuts.\n" + originalForm = "<165>1 2003-08-24T05:14:15-07:00 192.0.2.1 myproc 8710 - - It's time to make the do-nuts." +) type exporterTest struct { srv net.TCPListener @@ -40,9 +42,11 @@ func exampleLog(t *testing.T) plog.LogRecord { assert.NoError(t, err, "failed to start test syslog server") ts := pcommon.NewTimestampFromTime(timeStr) buffer.SetTimestamp(ts) - attrMap := map[string]any{"proc_id": "8710", "message": "It's time to make the do-nuts.", + attrMap := map[string]any{ + "proc_id": "8710", "message": "It's time to make the do-nuts.", "appname": "myproc", "hostname": "192.0.2.1", "priority": int64(165), - "version": int64(1)} + "version": int64(1), + } for k, v := range attrMap { if _, ok := v.(string); ok { buffer.Attributes().PutStr(k, v.(string)) @@ -70,10 +74,12 @@ func createExporterCreateSettings() exporter.Settings { } func TestInitExporter(t *testing.T) { - _, err := initExporter(&Config{Endpoint: "test.com", + _, err := initExporter(&Config{ + Endpoint: "test.com", Network: "tcp", Port: 514, - Protocol: "rfc5424"}, createExporterCreateSettings()) + Protocol: "rfc5424", + }, createExporterCreateSettings()) assert.NoError(t, err) } @@ -192,22 +198,26 @@ func TestTLSConfig(t *testing.T) { tlsSettings configtls.ClientConfig tlsConfig *tls.Config }{ - {name: "TCP with TLS configuration", + { + name: "TCP with TLS configuration", network: "tcp", tlsSettings: configtls.ClientConfig{}, tlsConfig: &tls.Config{}, }, - {name: "TCP insecure", + { + name: "TCP insecure", network: "tcp", tlsSettings: configtls.ClientConfig{Insecure: true}, tlsConfig: nil, }, - {name: "UDP with TLS configuration", + { + name: "UDP with TLS configuration", network: "udp", tlsSettings: configtls.ClientConfig{}, tlsConfig: nil, }, - {name: "UDP insecure", + { + name: "UDP insecure", network: "udp", tlsSettings: configtls.ClientConfig{Insecure: true}, tlsConfig: nil, @@ -217,11 +227,13 @@ func TestTLSConfig(t *testing.T) { for _, testInstance := range tests { t.Run(testInstance.name, func(t *testing.T) { exporter, err := initExporter( - &Config{Endpoint: "test.com", + &Config{ + Endpoint: "test.com", Network: testInstance.network, Port: 514, Protocol: "rfc5424", - TLSSetting: testInstance.tlsSettings}, + TLSSetting: testInstance.tlsSettings, + }, createExporterCreateSettings()) assert.NoError(t, err) diff --git a/exporter/syslogexporter/go.mod b/exporter/syslogexporter/go.mod index 1aa13e35454a..159d60a75c7f 100644 --- a/exporter/syslogexporter/go.mod +++ b/exporter/syslogexporter/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslog go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confignet v1.20.0 diff --git a/exporter/syslogexporter/go.sum b/exporter/syslogexporter/go.sum index 7b2a475b0cbd..ba5357115f25 100644 --- a/exporter/syslogexporter/go.sum +++ b/exporter/syslogexporter/go.sum @@ -48,8 +48,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/exporter/syslogexporter/rfc3164_formatter.go b/exporter/syslogexporter/rfc3164_formatter.go index 4298a2cb8406..17fa24ebb3ac 100644 --- a/exporter/syslogexporter/rfc3164_formatter.go +++ b/exporter/syslogexporter/rfc3164_formatter.go @@ -10,8 +10,7 @@ import ( "go.opentelemetry.io/collector/pdata/plog" ) -type rfc3164Formatter struct { -} +type rfc3164Formatter struct{} func newRFC3164Formatter() *rfc3164Formatter { return &rfc3164Formatter{} diff --git a/exporter/syslogexporter/sender.go b/exporter/syslogexporter/sender.go index eb8286854dbb..60b08bf37027 100644 --- a/exporter/syslogexporter/sender.go +++ b/exporter/syslogexporter/sender.go @@ -15,23 +15,31 @@ import ( "go.uber.org/zap" ) -const defaultPriority = 165 -const versionRFC5424 = 1 +const ( + defaultPriority = 165 + versionRFC5424 = 1 +) -const protocolRFC5424Str = "rfc5424" -const protocolRFC3164Str = "rfc3164" +const ( + protocolRFC5424Str = "rfc5424" + protocolRFC3164Str = "rfc3164" +) -const priority = "priority" -const version = "version" -const hostname = "hostname" -const app = "appname" -const pid = "proc_id" -const msgID = "msg_id" -const structuredData = "structured_data" -const message = "message" +const ( + priority = "priority" + version = "version" + hostname = "hostname" + app = "appname" + pid = "proc_id" + msgID = "msg_id" + structuredData = "structured_data" + message = "message" +) -const emptyValue = "-" -const emptyMessage = "" +const ( + emptyValue = "-" + emptyMessage = "" +) type sender struct { network string @@ -105,6 +113,7 @@ func (s *sender) Write(ctx context.Context, msgStr string) error { return s.write(msgStr) } + func (s *sender) write(msg string) error { // check if logs contains new line character at the end, if not add it if !strings.HasSuffix(msg, "\n") { diff --git a/exporter/tencentcloudlogserviceexporter/go.mod b/exporter/tencentcloudlogserviceexporter/go.mod index 0857d4866ef2..cdb1189d65d3 100644 --- a/exporter/tencentcloudlogserviceexporter/go.mod +++ b/exporter/tencentcloudlogserviceexporter/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/pierrec/lz4 v2.6.1+incompatible - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1042 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/exporter/tencentcloudlogserviceexporter/go.sum b/exporter/tencentcloudlogserviceexporter/go.sum index 7e1060979597..65d5b0b90ebf 100644 --- a/exporter/tencentcloudlogserviceexporter/go.sum +++ b/exporter/tencentcloudlogserviceexporter/go.sum @@ -54,8 +54,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1042 h1:8aMk2lo6ET6GdcqoYdsadfUW+JuZ/2W5gXU4dtQAR1E= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1042/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/exporter/tencentcloudlogserviceexporter/logs_exporter.go b/exporter/tencentcloudlogserviceexporter/logs_exporter.go index bd93c095e3bd..98dad552308c 100644 --- a/exporter/tencentcloudlogserviceexporter/logs_exporter.go +++ b/exporter/tencentcloudlogserviceexporter/logs_exporter.go @@ -35,7 +35,8 @@ type logServiceLogsSender struct { func (s *logServiceLogsSender) pushLogsData( _ context.Context, - md plog.Logs) error { + md plog.Logs, +) error { var err error clsLogs := convertLogs(md) if len(clsLogs) > 0 { diff --git a/exporter/tencentcloudlogserviceexporter/logsdata_to_logservice.go b/exporter/tencentcloudlogserviceexporter/logsdata_to_logservice.go index 8603397dc646..4d16b95a9a3d 100644 --- a/exporter/tencentcloudlogserviceexporter/logsdata_to_logservice.go +++ b/exporter/tencentcloudlogserviceexporter/logsdata_to_logservice.go @@ -116,7 +116,8 @@ func instrumentationLibraryToLogContents(scope pcommon.InstrumentationScope) []* func mapLogRecordToLogService(lr plog.LogRecord, resourceContents, - instrumentationLibraryContents []*cls.Log_Content) *cls.Log { + instrumentationLibraryContents []*cls.Log_Content, +) *cls.Log { if lr.Body().Type() == pcommon.ValueTypeEmpty { return nil } diff --git a/exporter/zipkinexporter/go.mod b/exporter/zipkinexporter/go.mod index da796047646d..e9068339e7c2 100644 --- a/exporter/zipkinexporter/go.mod +++ b/exporter/zipkinexporter/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.114.0 github.com/openzipkin/zipkin-go v0.4.3 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 diff --git a/exporter/zipkinexporter/go.sum b/exporter/zipkinexporter/go.sum index f73b17e2e44f..22a610ae2d36 100644 --- a/exporter/zipkinexporter/go.sum +++ b/exporter/zipkinexporter/go.sum @@ -68,8 +68,8 @@ github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.111.0 h1:D3LJTYrrK2ac94E2PXPSbVkArqxbklbCLsE4MAJQdRo= diff --git a/exporter/zipkinexporter/zipkin_test.go b/exporter/zipkinexporter/zipkin_test.go index 1899b8115b5b..a9c01d3f72f5 100644 --- a/exporter/zipkinexporter/zipkin_test.go +++ b/exporter/zipkinexporter/zipkin_test.go @@ -152,6 +152,7 @@ var _ zipkinreporter.Reporter = (*mockZipkinReporter)(nil) func (r *mockZipkinReporter) Send(span zipkinmodel.SpanModel) { r.batch = append(r.batch, &span) } + func (r *mockZipkinReporter) Close() error { return nil } diff --git a/extension/ackextension/go.mod b/extension/ackextension/go.mod index bb5c6314d7a1..754c6231ee67 100644 --- a/extension/ackextension/go.mod +++ b/extension/ackextension/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/hashicorp/golang-lru/v2 v2.0.7 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/extension v0.114.0 diff --git a/extension/ackextension/go.sum b/extension/ackextension/go.sum index ccaf8ba03119..d729d1e70839 100644 --- a/extension/ackextension/go.sum +++ b/extension/ackextension/go.sum @@ -23,8 +23,8 @@ 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/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/extension/asapauthextension/go.mod b/extension/asapauthextension/go.mod index f0107a75102e..daa33e6142ab 100644 --- a/extension/asapauthextension/go.mod +++ b/extension/asapauthextension/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( bitbucket.org/atlassian/go-asap/v2 v2.9.0 github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configopaque v1.20.0 diff --git a/extension/asapauthextension/go.sum b/extension/asapauthextension/go.sum index 2087d1452957..cdd0f97c959b 100644 --- a/extension/asapauthextension/go.sum +++ b/extension/asapauthextension/go.sum @@ -44,8 +44,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/extension/awsproxy/config.go b/extension/awsproxy/config.go index a2d0f5f0c9f3..a568feaf5caa 100644 --- a/extension/awsproxy/config.go +++ b/extension/awsproxy/config.go @@ -9,7 +9,6 @@ import ( // Config defines the configuration for an AWS X-Ray proxy. type Config struct { - // ProxyServer defines configurations related to the local TCP proxy server. ProxyConfig proxy.Config `mapstructure:",squash"` } diff --git a/extension/awsproxy/extension.go b/extension/awsproxy/extension.go index 2b05655e7637..dddaf7700b6e 100644 --- a/extension/awsproxy/extension.go +++ b/extension/awsproxy/extension.go @@ -27,7 +27,6 @@ var _ extension.Extension = (*xrayProxy)(nil) func (x *xrayProxy) Start(_ context.Context, host component.Host) error { srv, err := proxy.NewServer(&x.config.ProxyConfig, x.settings.Logger) - if err != nil { return err } diff --git a/extension/awsproxy/go.mod b/extension/awsproxy/go.mod index 3613a43331a2..353ab1b5d145 100644 --- a/extension/awsproxy/go.mod +++ b/extension/awsproxy/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/extension/awsproxy/go.sum b/extension/awsproxy/go.sum index 7f8c67b9446f..7915f7d79e0b 100644 --- a/extension/awsproxy/go.sum +++ b/extension/awsproxy/go.sum @@ -45,8 +45,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/extension/basicauthextension/config.go b/extension/basicauthextension/config.go index 2a1cb40891fd..62aab9be2780 100644 --- a/extension/basicauthextension/config.go +++ b/extension/basicauthextension/config.go @@ -28,7 +28,6 @@ type ClientAuthSettings struct { Password configopaque.String `mapstructure:"password"` } type Config struct { - // Htpasswd settings. Htpasswd *HtpasswdSettings `mapstructure:"htpasswd,omitempty"` diff --git a/extension/basicauthextension/extension_test.go b/extension/basicauthextension/extension_test.go index 01569d3db242..2dab5cc5b8c7 100644 --- a/extension/basicauthextension/extension_test.go +++ b/extension/basicauthextension/extension_test.go @@ -17,33 +17,31 @@ import ( "go.opentelemetry.io/collector/component/componenttest" ) -var ( - credentials = [][]string{ - {"htpasswd-md5", "$apr1$FVVioVP7$ZdIWPG1p4E/ErujO7kA2n0"}, - {"openssl-apr1", "$apr1$peiE49Vv$lo.z77Z.6.a.Lm7GMjzQh0"}, - {"openssl-md5", "$1$mvmz31IB$U9KpHBLegga2doA0e3s3N0"}, - {"htpasswd-sha", "{SHA}vFznddje0Ht4+pmO0FaxwrUKN/M="}, - {"htpasswd-bcrypt", "$2y$10$Q6GeMFPd0dAxhQULPDdAn.DFy6NDmLaU0A7e2XoJz7PFYAEADFKbC"}, - {"", "$2a$06$DCq7YPn5Rq63x1Lad4cll.TV4S6ytwfsfvkgY8jIucDrjc8deX1s."}, - {"", "$2a$08$HqWuK6/Ng6sg9gQzbLrgb.Tl.ZHfXLhvt/SgVyWhQqgqcZ7ZuUtye"}, - {"", "$2a$10$k1wbIrmNyFAPwPVPSVa/zecw2BCEnBwVS2GbrmgzxFUOqW9dk4TCW"}, - {"", "$2a$12$k42ZFHFWqBp3vWli.nIn8uYyIkbvYRvodzbfbK18SSsY.CsIQPlxO"}, - {"a", "$2a$06$m0CrhHm10qJ3lXRY.5zDGO3rS2KdeeWLuGmsfGlMfOxih58VYVfxe"}, - {"a", "$2a$08$cfcvVd2aQ8CMvoMpP2EBfeodLEkkFJ9umNEfPD18.hUF62qqlC/V."}, - {"a", "$2a$10$k87L/MF28Q673VKh8/cPi.SUl7MU/rWuSiIDDFayrKk/1tBsSQu4u"}, - {"a", "$2a$12$8NJH3LsPrANStV6XtBakCez0cKHXVxmvxIlcz785vxAIZrihHZpeS"}, - {"abc", "$2a$06$If6bvum7DFjUnE9p2uDeDu0YHzrHM6tf.iqN8.yx.jNN1ILEf7h0i"}, - {"abcdefghijklmnopqrstuvwxyz", "$2a$06$.rCVZVOThsIa97pEDOxvGuRRgzG64bvtJ0938xuqzv18d3ZpQhstC"}, - {"abcdefghijklmnopqrstuvwxyz", "$2a$08$aTsUwsyowQuzRrDqFflhgekJ8d9/7Z3GV3UcgvzQW3J5zMyrTvlz."}, - {"abcdefghijklmnopqrstuvwxyz", "$2a$10$fVH8e28OQRj9tqiDXs1e1uxpsjN0c7II7YPKXua2NAKYvM6iQk7dq"}, - {"abcdefghijklmnopqrstuvwxyz", "$2a$12$D4G5f18o7aMMfwasBL7GpuQWuP3pkrZrOAnqP.bmezbMng.QwJ/pG"}, - {"~!@#$%^&*() ~!@#$%^&*()PNBFRD", "$2a$06$fPIsBO8qRqkjj273rfaOI.HtSV9jLDpTbZn782DC6/t7qT67P6FfO"}, - {"~!@#$%^&*() ~!@#$%^&*()PNBFRD", "$2a$08$Eq2r4G/76Wv39MzSX262huzPz612MZiYHVUJe/OcOql2jo4.9UxTW"}, - {"~!@#$%^&*() ~!@#$%^&*()PNBFRD", "$2a$10$LgfYWkbzEvQ4JakH7rOvHe0y8pHKF9OaFgwUZ2q7W2FFZmZzJYlfS"}, - {"~!@#$%^&*() ~!@#$%^&*()PNBFRD", "$2a$12$WApznUOJfkEGSmYRfnkrPOr466oFDCaj4b6HY3EXGvfxm43seyhgC"}, - {"ππππππππ", "$2a$10$.TtQJ4Jr6isd4Hp.mVfZeuh6Gws4rOQ/vdBczhDx.19NFK0Y84Dle"}, - } -) +var credentials = [][]string{ + {"htpasswd-md5", "$apr1$FVVioVP7$ZdIWPG1p4E/ErujO7kA2n0"}, + {"openssl-apr1", "$apr1$peiE49Vv$lo.z77Z.6.a.Lm7GMjzQh0"}, + {"openssl-md5", "$1$mvmz31IB$U9KpHBLegga2doA0e3s3N0"}, + {"htpasswd-sha", "{SHA}vFznddje0Ht4+pmO0FaxwrUKN/M="}, + {"htpasswd-bcrypt", "$2y$10$Q6GeMFPd0dAxhQULPDdAn.DFy6NDmLaU0A7e2XoJz7PFYAEADFKbC"}, + {"", "$2a$06$DCq7YPn5Rq63x1Lad4cll.TV4S6ytwfsfvkgY8jIucDrjc8deX1s."}, + {"", "$2a$08$HqWuK6/Ng6sg9gQzbLrgb.Tl.ZHfXLhvt/SgVyWhQqgqcZ7ZuUtye"}, + {"", "$2a$10$k1wbIrmNyFAPwPVPSVa/zecw2BCEnBwVS2GbrmgzxFUOqW9dk4TCW"}, + {"", "$2a$12$k42ZFHFWqBp3vWli.nIn8uYyIkbvYRvodzbfbK18SSsY.CsIQPlxO"}, + {"a", "$2a$06$m0CrhHm10qJ3lXRY.5zDGO3rS2KdeeWLuGmsfGlMfOxih58VYVfxe"}, + {"a", "$2a$08$cfcvVd2aQ8CMvoMpP2EBfeodLEkkFJ9umNEfPD18.hUF62qqlC/V."}, + {"a", "$2a$10$k87L/MF28Q673VKh8/cPi.SUl7MU/rWuSiIDDFayrKk/1tBsSQu4u"}, + {"a", "$2a$12$8NJH3LsPrANStV6XtBakCez0cKHXVxmvxIlcz785vxAIZrihHZpeS"}, + {"abc", "$2a$06$If6bvum7DFjUnE9p2uDeDu0YHzrHM6tf.iqN8.yx.jNN1ILEf7h0i"}, + {"abcdefghijklmnopqrstuvwxyz", "$2a$06$.rCVZVOThsIa97pEDOxvGuRRgzG64bvtJ0938xuqzv18d3ZpQhstC"}, + {"abcdefghijklmnopqrstuvwxyz", "$2a$08$aTsUwsyowQuzRrDqFflhgekJ8d9/7Z3GV3UcgvzQW3J5zMyrTvlz."}, + {"abcdefghijklmnopqrstuvwxyz", "$2a$10$fVH8e28OQRj9tqiDXs1e1uxpsjN0c7II7YPKXua2NAKYvM6iQk7dq"}, + {"abcdefghijklmnopqrstuvwxyz", "$2a$12$D4G5f18o7aMMfwasBL7GpuQWuP3pkrZrOAnqP.bmezbMng.QwJ/pG"}, + {"~!@#$%^&*() ~!@#$%^&*()PNBFRD", "$2a$06$fPIsBO8qRqkjj273rfaOI.HtSV9jLDpTbZn782DC6/t7qT67P6FfO"}, + {"~!@#$%^&*() ~!@#$%^&*()PNBFRD", "$2a$08$Eq2r4G/76Wv39MzSX262huzPz612MZiYHVUJe/OcOql2jo4.9UxTW"}, + {"~!@#$%^&*() ~!@#$%^&*()PNBFRD", "$2a$10$LgfYWkbzEvQ4JakH7rOvHe0y8pHKF9OaFgwUZ2q7W2FFZmZzJYlfS"}, + {"~!@#$%^&*() ~!@#$%^&*()PNBFRD", "$2a$12$WApznUOJfkEGSmYRfnkrPOr466oFDCaj4b6HY3EXGvfxm43seyhgC"}, + {"ππππππππ", "$2a$10$.TtQJ4Jr6isd4Hp.mVfZeuh6Gws4rOQ/vdBczhDx.19NFK0Y84Dle"}, +} func TestBasicAuth_Valid(t *testing.T) { t.Parallel() diff --git a/extension/basicauthextension/go.mod b/extension/basicauthextension/go.mod index 462d3e5c3ee5..f4c6e78ae51c 100644 --- a/extension/basicauthextension/go.mod +++ b/extension/basicauthextension/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/basic go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/tg123/go-htpasswd v1.2.3 go.opentelemetry.io/collector/client v1.20.0 go.opentelemetry.io/collector/component v0.114.0 diff --git a/extension/basicauthextension/go.sum b/extension/basicauthextension/go.sum index eb3cb0dffb00..8c6558305681 100644 --- a/extension/basicauthextension/go.sum +++ b/extension/basicauthextension/go.sum @@ -41,8 +41,8 @@ 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/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tg123/go-htpasswd v1.2.3 h1:ALR6ZBIc2m9u70m+eAWUFt5p43ISbIvAvRFYzZPTOY8= github.com/tg123/go-htpasswd v1.2.3/go.mod h1:FcIrK0J+6zptgVwK1JDlqyajW/1B4PtuJ/FLWl7nx8A= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/extension/bearertokenauthextension/bearertokenauth_test.go b/extension/bearertokenauthextension/bearertokenauth_test.go index 55d3cc6c3805..a6257a8511bd 100644 --- a/extension/bearertokenauthextension/bearertokenauth_test.go +++ b/extension/bearertokenauthextension/bearertokenauth_test.go @@ -127,7 +127,7 @@ func TestBearerStartWatchStop(t *testing.T) { assert.True(t, credential.RequireTransportSecurity()) // change file content once - assert.NoError(t, os.WriteFile(bauth.filename, []byte(fmt.Sprintf("%stest", token)), 0600)) + assert.NoError(t, os.WriteFile(bauth.filename, []byte(fmt.Sprintf("%stest", token)), 0o600)) time.Sleep(5 * time.Second) credential, _ = bauth.PerRPCCredentials() md, err = credential.GetRequestMetadata(context.Background()) @@ -136,7 +136,7 @@ func TestBearerStartWatchStop(t *testing.T) { assert.NoError(t, err) // change file content back - assert.NoError(t, os.WriteFile(bauth.filename, token, 0600)) + assert.NoError(t, os.WriteFile(bauth.filename, token, 0o600)) time.Sleep(5 * time.Second) credential, _ = bauth.PerRPCCredentials() md, err = credential.GetRequestMetadata(context.Background()) @@ -177,7 +177,7 @@ func TestBearerTokenFileContentUpdate(t *testing.T) { assert.Equal(t, authHeaderValue, fmt.Sprintf("%s %s", scheme, string(token))) // change file content once - assert.NoError(t, os.WriteFile(bauth.filename, []byte(fmt.Sprintf("%stest", token)), 0600)) + assert.NoError(t, os.WriteFile(bauth.filename, []byte(fmt.Sprintf("%stest", token)), 0o600)) time.Sleep(5 * time.Second) tokenNew, err := os.ReadFile(bauth.filename) @@ -191,7 +191,7 @@ func TestBearerTokenFileContentUpdate(t *testing.T) { assert.Equal(t, authHeaderValue, fmt.Sprintf("%s %s", scheme, string(tokenNew))) // change file content back - assert.NoError(t, os.WriteFile(bauth.filename, token, 0600)) + assert.NoError(t, os.WriteFile(bauth.filename, token, 0o600)) time.Sleep(5 * time.Second) // check if request is updated with the old token diff --git a/extension/bearertokenauthextension/config.go b/extension/bearertokenauthextension/config.go index f8513c1ef011..f136d635ea32 100644 --- a/extension/bearertokenauthextension/config.go +++ b/extension/bearertokenauthextension/config.go @@ -12,7 +12,6 @@ import ( // Config specifies how the Per-RPC bearer token based authentication data should be obtained. type Config struct { - // Scheme specifies the auth-scheme for the token. Defaults to "Bearer" Scheme string `mapstructure:"scheme,omitempty"` @@ -23,8 +22,10 @@ type Config struct { Filename string `mapstructure:"filename,omitempty"` } -var _ component.Config = (*Config)(nil) -var errNoTokenProvided = errors.New("no bearer token provided") +var ( + _ component.Config = (*Config)(nil) + errNoTokenProvided = errors.New("no bearer token provided") +) // Validate checks if the extension configuration is valid func (cfg *Config) Validate() error { diff --git a/extension/bearertokenauthextension/go.mod b/extension/bearertokenauthextension/go.mod index 0e0595ed80bf..9e6a79769ca4 100644 --- a/extension/bearertokenauthextension/go.mod +++ b/extension/bearertokenauthextension/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/fsnotify/fsnotify v1.8.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configopaque v1.20.0 diff --git a/extension/bearertokenauthextension/go.sum b/extension/bearertokenauthextension/go.sum index c85d4b537f7c..a2971ba3375d 100644 --- a/extension/bearertokenauthextension/go.sum +++ b/extension/bearertokenauthextension/go.sum @@ -35,8 +35,8 @@ 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/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/extension/cgroupruntimeextension/Makefile b/extension/cgroupruntimeextension/Makefile new file mode 100644 index 000000000000..ded7a36092dc --- /dev/null +++ b/extension/cgroupruntimeextension/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/extension/cgroupruntimeextension/README.md b/extension/cgroupruntimeextension/README.md new file mode 100644 index 000000000000..f7d79099d6c1 --- /dev/null +++ b/extension/cgroupruntimeextension/README.md @@ -0,0 +1,42 @@ +# Cgroup Go runtime 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%2Fcgroupruntime%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fcgroupruntime) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fcgroupruntime%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fcgroupruntime) | +| [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), [@rogercoll](https://www.github.com/rogercoll) | + +[development]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#development +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + + +## Overview + +The OpenTelemetry Cgroup Auto-Config Extension is designed to optimize Go runtime performance in containerized environments by automatically configuring GOMAXPROCS and GOMEMLIMIT based on the Linux cgroup filesystem. This extension leverages [automaxprocs](https://github.com/uber-go/automaxprocs) and [automemlimit](https://github.com/KimMachineGun/automemlimit) packages to dynamically adjust Go runtime variables, ensuring efficient resource usage aligned with container limits. + +## Configuration + +The following settings can be configured: + +- `gomaxprocs`: Configures the behavior of setting `GOMAXPROCS`, the maximum number of CPUs for Go runtime. Options: + - `enabled`: A boolean value to enable or disable automatic configuration of `GOMAXPROCS` based on the system’s cgroup settings (default: true). + +- `gomemlimit`: Configures the behavior of setting `GOMEMLIMIT`, the maximum memory limit for Go runtime. Options: + - `enabled`: A boolean value to enable or disable automatic configuration of `GOMEMLIMIT` (default: true). + - `ratio`: A floating-point value between 0 and 1 that represents the fraction of the detected memory limit to allocate for the Go runtime (default: 0.9). + +## Examples + +```yaml +extension: + # processor name: cgroupruntime + cgroupruntime: + gomaxprocs: + enabled: true + gomemlimit: + enabled: true + ratio: 0.8 +``` diff --git a/extension/cgroupruntimeextension/config.go b/extension/cgroupruntimeextension/config.go new file mode 100644 index 000000000000..b9f3807b0c32 --- /dev/null +++ b/extension/cgroupruntimeextension/config.go @@ -0,0 +1,28 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package cgroupruntimeextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/cgroupruntimeextension" + +import "errors" // Config contains the configuration for the cgroup runtime extension. + +type Config struct { + GoMaxProcs GoMaxProcsConfig `mapstructure:"gomaxprocs"` + GoMemLimit GoMemLimitConfig `mapstructure:"gomemlimit"` +} + +type GoMaxProcsConfig struct { + Enabled bool `mapstructure:"enabled"` +} + +type GoMemLimitConfig struct { + Enabled bool `mapstructure:"enabled"` + Ratio float64 `mapstructure:"ratio"` +} + +// Validate checks if the extension configuration is valid +func (cfg *Config) Validate() error { + if cfg.GoMemLimit.Ratio <= 0 || cfg.GoMemLimit.Ratio > 1 { + return errors.New("gomemlimit ratio must be in the (0.0,1.0] range") + } + return nil +} diff --git a/extension/cgroupruntimeextension/config_test.go b/extension/cgroupruntimeextension/config_test.go new file mode 100644 index 000000000000..653102e0601b --- /dev/null +++ b/extension/cgroupruntimeextension/config_test.go @@ -0,0 +1,81 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package cgroupruntimeextension + +import ( + "path/filepath" + "testing" + + "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/extension/cgroupruntimeextension/internal/metadata" +) + +func TestLoadConfig(t *testing.T) { + t.Parallel() + + tests := []struct { + id component.ID + expected component.Config + unmarshalErrorMessage string + validateErrorMessage string + }{ + { + id: component.NewID(metadata.Type), + expected: &Config{ + GoMaxProcs: GoMaxProcsConfig{Enabled: true}, + GoMemLimit: GoMemLimitConfig{ + Enabled: true, + Ratio: 0.9, + }, + }, + }, + { + id: component.NewIDWithName(metadata.Type, "invalid_ratio"), + validateErrorMessage: "gomemlimit ratio must be in the (0.0,1.0] range", + }, + { + id: component.NewIDWithName(metadata.Type, "invalid_ratio_disabled"), + validateErrorMessage: "gomemlimit ratio must be in the (0.0,1.0] range", + }, + { + id: component.NewIDWithName(metadata.Type, "invalid_ratio_negative"), + validateErrorMessage: "gomemlimit ratio must be in the (0.0,1.0] range", + }, + { + id: component.NewIDWithName(metadata.Type, "invalid_ratio_type"), + unmarshalErrorMessage: "decoding failed due to the following error(s):\n\n'gomemlimit.ratio' expected type 'float64', got unconvertible type 'string', value: 'not_valid'", + }, + } + + 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) + + if tt.unmarshalErrorMessage != "" { + assert.ErrorContains(t, sub.Unmarshal(cfg), tt.unmarshalErrorMessage) + return + } + require.NoError(t, sub.Unmarshal(cfg)) + + if tt.validateErrorMessage != "" { + assert.EqualError(t, component.ValidateConfig(cfg), tt.validateErrorMessage) + return + } + + assert.NoError(t, component.ValidateConfig(cfg)) + assert.Equal(t, tt.expected, cfg) + }) + } +} diff --git a/extension/cgroupruntimeextension/doc.go b/extension/cgroupruntimeextension/doc.go new file mode 100644 index 000000000000..5832bf5a06f1 --- /dev/null +++ b/extension/cgroupruntimeextension/doc.go @@ -0,0 +1,6 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml + +package cgroupruntimeextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/cgroupruntimeextension" diff --git a/extension/cgroupruntimeextension/extension.go b/extension/cgroupruntimeextension/extension.go new file mode 100644 index 000000000000..78fc2c370f5f --- /dev/null +++ b/extension/cgroupruntimeextension/extension.go @@ -0,0 +1,77 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package cgroupruntimeextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/cgroupruntimeextension" + +import ( + "context" + "runtime" + "runtime/debug" + + "go.opentelemetry.io/collector/component" + "go.uber.org/zap" +) + +type ( + undoFunc func() + maxProcsFn func() (undoFunc, error) + memLimitWithRatioFn func(float64) (undoFunc, error) +) + +type cgroupRuntimeExtension struct { + config *Config + logger *zap.Logger + + // runtime modifiers + maxProcsFn + undoMaxProcsFn undoFunc + + memLimitWithRatioFn + undoMemLimitFn undoFunc +} + +func newCgroupRuntime(cfg *Config, logger *zap.Logger, maxProcsFn maxProcsFn, memLimitFn memLimitWithRatioFn) *cgroupRuntimeExtension { + return &cgroupRuntimeExtension{ + config: cfg, + logger: logger, + maxProcsFn: maxProcsFn, + memLimitWithRatioFn: memLimitFn, + } +} + +func (c *cgroupRuntimeExtension) Start(_ context.Context, _ component.Host) error { + var err error + if c.config.GoMaxProcs.Enabled { + c.undoMaxProcsFn, err = c.maxProcsFn() + if err != nil { + return err + } + + c.logger.Info("GOMAXPROCS has been set", + zap.Int("GOMAXPROCS", runtime.GOMAXPROCS(-1)), + ) + } + + if c.config.GoMemLimit.Enabled { + c.undoMemLimitFn, err = c.memLimitWithRatioFn(c.config.GoMemLimit.Ratio) + if err != nil { + return err + } + + c.logger.Info("GOMEMLIMIT has been set", + zap.Int64("GOMEMLIMIT", debug.SetMemoryLimit(-1)), + ) + } + return nil +} + +func (c *cgroupRuntimeExtension) Shutdown(_ context.Context) error { + if c.undoMaxProcsFn != nil { + c.undoMaxProcsFn() + } + if c.undoMemLimitFn != nil { + c.undoMemLimitFn() + } + + return nil +} diff --git a/extension/cgroupruntimeextension/extension_test.go b/extension/cgroupruntimeextension/extension_test.go new file mode 100644 index 000000000000..733478c735eb --- /dev/null +++ b/extension/cgroupruntimeextension/extension_test.go @@ -0,0 +1,67 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package cgroupruntimeextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestExtension(t *testing.T) { + tests := []struct { + name string + config *Config + expectedCalls int + }{ + { + name: "all enabled", + config: &Config{ + GoMaxProcs: GoMaxProcsConfig{ + Enabled: true, + }, + GoMemLimit: GoMemLimitConfig{ + Enabled: true, + Ratio: 0.5, + }, + }, + expectedCalls: 4, + }, + { + name: "everything disabled", + config: &Config{ + GoMaxProcs: GoMaxProcsConfig{ + Enabled: false, + }, + GoMemLimit: GoMemLimitConfig{ + Enabled: false, + }, + }, + expectedCalls: 0, + }, + } + + for _, test := range tests { + t.Run(test.name, func(t *testing.T) { + allCalls := 0 + var _err error + setterMock := func() (undoFunc, error) { + allCalls++ + return func() { allCalls++ }, _err + } + settings := extensiontest.NewNopSettings() + cg := newCgroupRuntime(test.config, settings.Logger, setterMock, func(_ float64) (undoFunc, error) { return setterMock() }) + ctx := context.Background() + + err := cg.Start(ctx, componenttest.NewNopHost()) + require.NoError(t, err) + + require.NoError(t, cg.Shutdown(ctx)) + require.Equal(t, test.expectedCalls, allCalls) + }) + } +} diff --git a/extension/cgroupruntimeextension/factory.go b/extension/cgroupruntimeextension/factory.go new file mode 100644 index 000000000000..1905811dc3b8 --- /dev/null +++ b/extension/cgroupruntimeextension/factory.go @@ -0,0 +1,54 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package cgroupruntimeextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/cgroupruntimeextension" + +import ( + "context" + "fmt" + "runtime/debug" + + "github.com/KimMachineGun/automemlimit/memlimit" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/extension" + "go.uber.org/automaxprocs/maxprocs" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/cgroupruntimeextension/internal/metadata" +) + +func NewFactory() extension.Factory { + return extension.NewFactory( + metadata.Type, + createDefaultConfig, + createExtension, + metadata.ExtensionStability, + ) +} + +func createDefaultConfig() component.Config { + return &Config{ + GoMaxProcs: GoMaxProcsConfig{ + Enabled: true, + }, + GoMemLimit: GoMemLimitConfig{ + Enabled: true, + // By default, it sets `GOMEMLIMIT` to 90% of cgroup's memory limit. + Ratio: 0.9, + }, + } +} + +func createExtension(_ context.Context, set extension.Settings, cfg component.Config) (extension.Extension, error) { + cgroupConfig := cfg.(*Config) + return newCgroupRuntime(cgroupConfig, set.Logger, + func() (undoFunc, error) { + undo, err := maxprocs.Set(maxprocs.Logger(func(str string, params ...any) { + set.Logger.Debug(fmt.Sprintf(str, params)) + })) + return undoFunc(undo), err + }, + func(ratio float64) (undoFunc, error) { + initial, err := memlimit.SetGoMemLimitWithOpts(memlimit.WithRatio(ratio)) + return func() { debug.SetMemoryLimit(initial) }, err + }), nil +} diff --git a/extension/cgroupruntimeextension/generated_component_test.go b/extension/cgroupruntimeextension/generated_component_test.go new file mode 100644 index 000000000000..5c3334b208f1 --- /dev/null +++ b/extension/cgroupruntimeextension/generated_component_test.go @@ -0,0 +1,49 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package cgroupruntimeextension + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" + "go.opentelemetry.io/collector/extension/extensiontest" +) + +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "cgroupruntime", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) +} + +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, sub.Unmarshal(&cfg)) + t.Run("shutdown", func(t *testing.T) { + e, err := factory.Create(context.Background(), extensiontest.NewNopSettings(), cfg) + require.NoError(t, err) + err = e.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run("lifecycle", func(t *testing.T) { + firstExt, err := factory.Create(context.Background(), extensiontest.NewNopSettings(), cfg) + require.NoError(t, err) + require.NoError(t, firstExt.Start(context.Background(), componenttest.NewNopHost())) + require.NoError(t, firstExt.Shutdown(context.Background())) + + secondExt, err := factory.Create(context.Background(), extensiontest.NewNopSettings(), 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/cgroupruntimeextension/generated_package_test.go b/extension/cgroupruntimeextension/generated_package_test.go new file mode 100644 index 000000000000..8ad0aa57804f --- /dev/null +++ b/extension/cgroupruntimeextension/generated_package_test.go @@ -0,0 +1,13 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package cgroupruntimeextension + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/extension/cgroupruntimeextension/go.mod b/extension/cgroupruntimeextension/go.mod new file mode 100644 index 000000000000..485a2e48dbe7 --- /dev/null +++ b/extension/cgroupruntimeextension/go.mod @@ -0,0 +1,54 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/extension/cgroupruntimeextension + +go 1.22.0 + +require ( + github.com/KimMachineGun/automemlimit v0.6.1 + github.com/stretchr/testify v1.9.0 + go.opentelemetry.io/collector/component v0.114.0 + go.opentelemetry.io/collector/component/componenttest v0.114.0 + go.opentelemetry.io/collector/confmap v1.20.0 + go.opentelemetry.io/collector/extension v0.114.0 + go.opentelemetry.io/collector/extension/extensiontest v0.114.0 + go.uber.org/automaxprocs v1.5.3 + go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 +) + +require ( + github.com/cilium/ebpf v0.9.1 // indirect + github.com/containerd/cgroups/v3 v3.0.1 // indirect + github.com/coreos/go-systemd/v22 v22.3.2 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/docker/go-units v0.4.0 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.2.1 // indirect + github.com/godbus/dbus/v5 v5.0.4 // indirect + github.com/gogo/protobuf v1.3.2 // 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.2 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/opencontainers/runtime-spec v1.0.2 // indirect + github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/sirupsen/logrus v1.8.1 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.114.0 // indirect + go.opentelemetry.io/collector/pdata v1.20.0 // indirect + go.opentelemetry.io/otel v1.32.0 // indirect + go.opentelemetry.io/otel/metric v1.32.0 // indirect + go.opentelemetry.io/otel/sdk v1.32.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.32.0 // indirect + go.opentelemetry.io/otel/trace v1.32.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sys v0.27.0 // indirect + golang.org/x/text v0.17.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect + google.golang.org/grpc v1.67.1 // indirect + google.golang.org/protobuf v1.35.1 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/extension/cgroupruntimeextension/go.sum b/extension/cgroupruntimeextension/go.sum new file mode 100644 index 000000000000..7ed11ad2687e --- /dev/null +++ b/extension/cgroupruntimeextension/go.sum @@ -0,0 +1,137 @@ +github.com/KimMachineGun/automemlimit v0.6.1 h1:ILa9j1onAAMadBsyyUJv5cack8Y1WT26yLj/V+ulKp8= +github.com/KimMachineGun/automemlimit v0.6.1/go.mod h1:T7xYht7B8r6AG/AqFcUdc7fzd2bIdBKmepfP2S1svPY= +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/containerd/cgroups/v3 v3.0.1 h1:4hfGvu8rfGIwVIDd+nLzn/B9ZXx4BcCjzt5ToenJRaE= +github.com/containerd/cgroups/v3 v3.0.1/go.mod h1:/vtwk1VXrtoa5AaZLkypuOJgA/6DyPMZHJPGQNtlHnw= +github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +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/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +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-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/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.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= +github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= +github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA= +github.com/godbus/dbus/v5 v5.0.4/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/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.2 h1:I2rtLRqXRy1p01m/utEtpZSSA6dcJbgGVuE27kW2PzQ= +github.com/knadh/koanf/v2 v2.1.2/go.mod h1:Gphfaen0q1Fc1HTgJgSTC4oRX9R2R5ErYMZJy8fLJBo= +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/opencontainers/runtime-spec v1.0.2 h1:UfAcuLBJB9Coz72x1hgl8O5RVzTdNiaglX6v2DM6FI0= +github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0= +github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y= +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/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= +github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= +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.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= +go.opentelemetry.io/collector/component v0.114.0/go.mod h1:MLxtjZ6UVHjDxSdhGLuJfHBHvfl1iT/Y7IaQPD24Eww= +go.opentelemetry.io/collector/component/componenttest v0.114.0 h1:GM4FTTlfeXoVm6sZYBHImwlRN8ayh2oAfUhvaFj7Zo8= +go.opentelemetry.io/collector/component/componenttest v0.114.0/go.mod h1:ZZEJMtbJtoVC/3/9R1HzERq+cYQRxuMFQrPCpfZ4Xos= +go.opentelemetry.io/collector/config/configtelemetry v0.114.0 h1:kjLeyrumge6wsX6ZIkicdNOlBXaEyW2PI2ZdVXz/rzY= +go.opentelemetry.io/collector/config/configtelemetry v0.114.0/go.mod h1:R0MBUxjSMVMIhljuDHWIygzzJWQyZHXXWIgQNxcFwhc= +go.opentelemetry.io/collector/confmap v1.20.0 h1:ARfOwmkKxFOud1njl03yAHQ30+uenlzqCO6LBYamDTE= +go.opentelemetry.io/collector/confmap v1.20.0/go.mod h1:DMpd9Ay/ffls3JoQBQ73vWeRsz1rNuLbwjo6WtjSQus= +go.opentelemetry.io/collector/extension v0.114.0 h1:9Qb92y8hD2WDC5aMDoj4JNQN+/5BQYJWPUPzLXX+iGw= +go.opentelemetry.io/collector/extension v0.114.0/go.mod h1:Yk2/1ptVgfTr12t+22v93nYJpioP14pURv2YercSzU0= +go.opentelemetry.io/collector/extension/extensiontest v0.114.0 h1:ibXDms1qrswlvlR6b3d2BeyI8sXUXoFV11yOi9Sop8o= +go.opentelemetry.io/collector/extension/extensiontest v0.114.0/go.mod h1:/bOYmqu5yTDfI1bJZUxFqm8ZtmcodpquebiSxiQxtDY= +go.opentelemetry.io/collector/pdata v1.20.0 h1:ePcwt4bdtISP0loHaE+C9xYoU2ZkIvWv89Fob16o9SM= +go.opentelemetry.io/collector/pdata v1.20.0/go.mod h1:Ox1YVLe87cZDB/TL30i4SUz1cA5s6AM6SpFMfY61ICs= +go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= +go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= +go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= +go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= +go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= +go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= +go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= +go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= +go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= +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.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.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +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-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.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.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +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-20240814211410-ddb44dafa142 h1:e7S5W7MGGLaSu8j3YjdezkZ+m1/Nm0uRVRMEMGk26Xs= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +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/cgroupruntimeextension/internal/metadata/generated_status.go b/extension/cgroupruntimeextension/internal/metadata/generated_status.go new file mode 100644 index 000000000000..172087ad81c5 --- /dev/null +++ b/extension/cgroupruntimeextension/internal/metadata/generated_status.go @@ -0,0 +1,16 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("cgroupruntime") + ScopeName = "github.com/open-telemetry/opentelemetry-collector-contrib/extension/cgroupruntimeextension" +) + +const ( + ExtensionStability = component.StabilityLevelDevelopment +) diff --git a/extension/cgroupruntimeextension/metadata.yaml b/extension/cgroupruntimeextension/metadata.yaml new file mode 100644 index 000000000000..6f1e7b9988ab --- /dev/null +++ b/extension/cgroupruntimeextension/metadata.yaml @@ -0,0 +1,12 @@ +type: cgroupruntime + +status: + class: extension + stability: + development: [extension] + distributions: [contrib] + codeowners: + active: [mx-psi, rogercoll] + +tests: + config: diff --git a/extension/cgroupruntimeextension/testdata/config.yaml b/extension/cgroupruntimeextension/testdata/config.yaml new file mode 100644 index 000000000000..228842e008ff --- /dev/null +++ b/extension/cgroupruntimeextension/testdata/config.yaml @@ -0,0 +1,13 @@ +cgroupruntime: +cgroupruntime/invalid_ratio: + gomemlimit: + ratio: 1.1 +cgroupruntime/invalid_ratio_disabled: + gomemlimit: + ratio: 0 +cgroupruntime/invalid_ratio_negative: + gomemlimit: + ratio: -12.5 +cgroupruntime/invalid_ratio_type: + gomemlimit: + ratio: "not_valid" diff --git a/extension/encoding/avrologencodingextension/extension.go b/extension/encoding/avrologencodingextension/extension.go index 522421823cec..32a2886d64ef 100644 --- a/extension/encoding/avrologencodingextension/extension.go +++ b/extension/encoding/avrologencodingextension/extension.go @@ -15,9 +15,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding" ) -var ( - _ encoding.LogsUnmarshalerExtension = (*avroLogExtension)(nil) -) +var _ encoding.LogsUnmarshalerExtension = (*avroLogExtension)(nil) type avroLogExtension struct { deserializer avroDeserializer diff --git a/extension/encoding/avrologencodingextension/go.mod b/extension/encoding/avrologencodingextension/go.mod index 79d294ebd71a..ed6ec118dd72 100644 --- a/extension/encoding/avrologencodingextension/go.mod +++ b/extension/encoding/avrologencodingextension/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/linkedin/goavro/v2 v2.13.0 github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/extension/encoding/avrologencodingextension/go.sum b/extension/encoding/avrologencodingextension/go.sum index 9e3597c79356..4546983ddc5e 100644 --- a/extension/encoding/avrologencodingextension/go.sum +++ b/extension/encoding/avrologencodingextension/go.sum @@ -53,8 +53,8 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS 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.5/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/extension/encoding/jaegerencodingextension/extension.go b/extension/encoding/jaegerencodingextension/extension.go index a035a589b970..97af945e3736 100644 --- a/extension/encoding/jaegerencodingextension/extension.go +++ b/extension/encoding/jaegerencodingextension/extension.go @@ -13,8 +13,10 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding" ) -var _ encoding.TracesUnmarshalerExtension = &jaegerExtension{} -var _ ptrace.Unmarshaler = &jaegerExtension{} +var ( + _ encoding.TracesUnmarshalerExtension = &jaegerExtension{} + _ ptrace.Unmarshaler = &jaegerExtension{} +) type jaegerExtension struct { config *Config diff --git a/extension/encoding/jaegerencodingextension/go.mod b/extension/encoding/jaegerencodingextension/go.mod index e4d44b3525a5..6442cc6cab25 100644 --- a/extension/encoding/jaegerencodingextension/go.mod +++ b/extension/encoding/jaegerencodingextension/go.mod @@ -7,7 +7,7 @@ require ( github.com/jaegertracing/jaeger v1.62.0 github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/extension/encoding/jaegerencodingextension/go.sum b/extension/encoding/jaegerencodingextension/go.sum index 0bd85282a3ad..4c6aef6164a9 100644 --- a/extension/encoding/jaegerencodingextension/go.sum +++ b/extension/encoding/jaegerencodingextension/go.sum @@ -50,8 +50,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/extension/encoding/jaegerencodingextension/jaeger.go b/extension/encoding/jaegerencodingextension/jaeger.go index c3321882a9ff..3f56a723cdd1 100644 --- a/extension/encoding/jaegerencodingextension/jaeger.go +++ b/extension/encoding/jaegerencodingextension/jaeger.go @@ -13,8 +13,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger" ) -type jaegerProtobufTrace struct { -} +type jaegerProtobufTrace struct{} func (j jaegerProtobufTrace) UnmarshalTraces(buf []byte) (ptrace.Traces, error) { span := &jaegerproto.Span{} @@ -25,8 +24,7 @@ func (j jaegerProtobufTrace) UnmarshalTraces(buf []byte) (ptrace.Traces, error) return jaegerSpanToTraces(span) } -type jaegerJSONTrace struct { -} +type jaegerJSONTrace struct{} func (j jaegerJSONTrace) UnmarshalTraces(buf []byte) (ptrace.Traces, error) { span := &jaegerproto.Span{} diff --git a/extension/encoding/jsonlogencodingextension/go.mod b/extension/encoding/jsonlogencodingextension/go.mod index b98b4599a177..3cc581bbd563 100644 --- a/extension/encoding/jsonlogencodingextension/go.mod +++ b/extension/encoding/jsonlogencodingextension/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/json-iterator/go v1.1.12 github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/extension/encoding/jsonlogencodingextension/go.sum b/extension/encoding/jsonlogencodingextension/go.sum index 8949f2ec54b3..dc6ba70a2b17 100644 --- a/extension/encoding/jsonlogencodingextension/go.sum +++ b/extension/encoding/jsonlogencodingextension/go.sum @@ -46,8 +46,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/extension/encoding/otlpencodingextension/extension_test.go b/extension/encoding/otlpencodingextension/extension_test.go index 77e42e748108..ddb0df0ed780 100644 --- a/extension/encoding/otlpencodingextension/extension_test.go +++ b/extension/encoding/otlpencodingextension/extension_test.go @@ -147,7 +147,7 @@ func createAndExtension0(c *Config, t *testing.T) *otlpExtension { } func generateTraces() ptrace.Traces { - var num = 10 + num := 10 now := time.Now() md := ptrace.NewTraces() ilm := md.ResourceSpans().AppendEmpty().ScopeSpans().AppendEmpty() @@ -162,7 +162,7 @@ func generateTraces() ptrace.Traces { } func generateLogs() plog.Logs { - var num = 10 + num := 10 md := plog.NewLogs() ilm := md.ResourceLogs().AppendEmpty().ScopeLogs().AppendEmpty() ilm.LogRecords().EnsureCapacity(num) @@ -174,7 +174,7 @@ func generateLogs() plog.Logs { } func generateMetrics() pmetric.Metrics { - var num = 10 + num := 10 now := time.Now() startTime := pcommon.NewTimestampFromTime(now.Add(-10 * time.Second)) endTime := pcommon.NewTimestampFromTime(now) @@ -194,7 +194,7 @@ func generateMetrics() pmetric.Metrics { } func generateProfiles() pprofile.Profiles { - var num = 10 + num := 10 now := time.Now() pd := pprofile.NewProfiles() ilm := pd.ResourceProfiles().AppendEmpty().ScopeProfiles().AppendEmpty() diff --git a/extension/encoding/otlpencodingextension/go.mod b/extension/encoding/otlpencodingextension/go.mod index 054f0354ad27..ab360ac1b550 100644 --- a/extension/encoding/otlpencodingextension/go.mod +++ b/extension/encoding/otlpencodingextension/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/extension/encoding/otlpencodingextension/go.sum b/extension/encoding/otlpencodingextension/go.sum index 8949f2ec54b3..dc6ba70a2b17 100644 --- a/extension/encoding/otlpencodingextension/go.sum +++ b/extension/encoding/otlpencodingextension/go.sum @@ -46,8 +46,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/extension/encoding/textencodingextension/go.mod b/extension/encoding/textencodingextension/go.mod index b509266463cc..27061611ea2d 100644 --- a/extension/encoding/textencodingextension/go.mod +++ b/extension/encoding/textencodingextension/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/extension/encoding/textencodingextension/go.sum b/extension/encoding/textencodingextension/go.sum index 95800aec5bcd..2ba4e2913b2e 100644 --- a/extension/encoding/textencodingextension/go.sum +++ b/extension/encoding/textencodingextension/go.sum @@ -46,8 +46,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/extension/encoding/zipkinencodingextension/go.mod b/extension/encoding/zipkinencodingextension/go.mod index c8f87987856f..f9f6c0f2cb32 100644 --- a/extension/encoding/zipkinencodingextension/go.mod +++ b/extension/encoding/zipkinencodingextension/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/extension/encoding/zipkinencodingextension/go.sum b/extension/encoding/zipkinencodingextension/go.sum index ff1dae72eb04..755852a76a87 100644 --- a/extension/encoding/zipkinencodingextension/go.sum +++ b/extension/encoding/zipkinencodingextension/go.sum @@ -52,8 +52,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/extension/googleclientauthextension/go.mod b/extension/googleclientauthextension/go.mod index 4017db693a0d..a678514deeaa 100644 --- a/extension/googleclientauthextension/go.mod +++ b/extension/googleclientauthextension/go.mod @@ -6,7 +6,7 @@ exclude github.com/knadh/koanf v1.5.0 require ( github.com/GoogleCloudPlatform/opentelemetry-operations-go/extension/googleclientauthextension v0.49.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/extension/googleclientauthextension/go.sum b/extension/googleclientauthextension/go.sum index 67b02d475cb1..64da2de094aa 100644 --- a/extension/googleclientauthextension/go.sum +++ b/extension/googleclientauthextension/go.sum @@ -87,8 +87,8 @@ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/extension/headerssetterextension/config_test.go b/extension/headerssetterextension/config_test.go index 188d116898a5..cfdef96f024c 100644 --- a/extension/headerssetterextension/config_test.go +++ b/extension/headerssetterextension/config_test.go @@ -36,7 +36,8 @@ func TestLoadConfig(t *testing.T) { Action: INSERT, FromContext: stringp("tenant_id"), Value: nil, - }, { + }, + { Key: stringp("X-Scope-OrgID"), Action: INSERT, FromContext: stringp("tenant_id"), diff --git a/extension/headerssetterextension/extension.go b/extension/headerssetterextension/extension.go index 72eb56278671..f9e3118d1946 100644 --- a/extension/headerssetterextension/extension.go +++ b/extension/headerssetterextension/extension.go @@ -35,7 +35,7 @@ func newHeadersSetterExtension(cfg *Config, logger *zap.Logger) (auth.Client, er Value: *header.Value, } } else if header.FromContext != nil { - var defaultValue = "" + defaultValue := "" if header.DefaultValue != nil { defaultValue = *header.DefaultValue } diff --git a/extension/headerssetterextension/go.mod b/extension/headerssetterextension/go.mod index 3173227c31b5..3730f37dcbf0 100644 --- a/extension/headerssetterextension/go.mod +++ b/extension/headerssetterextension/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/heade go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/client v1.20.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/extension/headerssetterextension/go.sum b/extension/headerssetterextension/go.sum index 649ff3359f33..05c21a1df31c 100644 --- a/extension/headerssetterextension/go.sum +++ b/extension/headerssetterextension/go.sum @@ -39,8 +39,8 @@ 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/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/extension/healthcheckextension/go.mod b/extension/healthcheckextension/go.mod index b171f5365632..58007af64b38 100644 --- a/extension/healthcheckextension/go.mod +++ b/extension/healthcheckextension/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/extension/healthcheckextension/go.sum b/extension/healthcheckextension/go.sum index 6e819a3fb04b..ff7d14804249 100644 --- a/extension/healthcheckextension/go.sum +++ b/extension/healthcheckextension/go.sum @@ -53,8 +53,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/extension/healthcheckv2extension/extension.go b/extension/healthcheckv2extension/extension.go index 23a307c9a9cf..ba3594b2fa40 100644 --- a/extension/healthcheckv2extension/extension.go +++ b/extension/healthcheckv2extension/extension.go @@ -34,9 +34,11 @@ type healthCheckExtension struct { host component.Host } -var _ component.Component = (*healthCheckExtension)(nil) -var _ extensioncapabilities.ConfigWatcher = (*healthCheckExtension)(nil) -var _ extensioncapabilities.PipelineWatcher = (*healthCheckExtension)(nil) +var ( + _ component.Component = (*healthCheckExtension)(nil) + _ extensioncapabilities.ConfigWatcher = (*healthCheckExtension)(nil) + _ extensioncapabilities.PipelineWatcher = (*healthCheckExtension)(nil) +) func newExtension( ctx context.Context, diff --git a/extension/healthcheckv2extension/go.mod b/extension/healthcheckv2extension/go.mod index 2e4a81484ce7..42da97039afa 100644 --- a/extension/healthcheckv2extension/go.mod +++ b/extension/healthcheckv2extension/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/status v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/extension/healthcheckv2extension/go.sum b/extension/healthcheckv2extension/go.sum index ae0e3ede5e3c..6083ad8b034a 100644 --- a/extension/healthcheckv2extension/go.sum +++ b/extension/healthcheckv2extension/go.sum @@ -55,8 +55,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/extension/healthcheckv2extension/internal/http/server.go b/extension/healthcheckv2extension/internal/http/server.go index d38f9f3944c0..0d14bdd6e966 100644 --- a/extension/healthcheckv2extension/internal/http/server.go +++ b/extension/healthcheckv2extension/internal/http/server.go @@ -35,8 +35,10 @@ type Server struct { doneCh chan struct{} } -var _ component.Component = (*Server)(nil) -var _ extensioncapabilities.ConfigWatcher = (*Server)(nil) +var ( + _ component.Component = (*Server)(nil) + _ extensioncapabilities.ConfigWatcher = (*Server)(nil) +) func NewServer( config *Config, diff --git a/extension/httpforwarderextension/config.go b/extension/httpforwarderextension/config.go index 96d5b3f0a155..0ca9b602358f 100644 --- a/extension/httpforwarderextension/config.go +++ b/extension/httpforwarderextension/config.go @@ -9,7 +9,6 @@ import ( // 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"` diff --git a/extension/httpforwarderextension/extension.go b/extension/httpforwarderextension/extension.go index 5ee39096a437..daa0e99ae1a7 100644 --- a/extension/httpforwarderextension/extension.go +++ b/extension/httpforwarderextension/extension.go @@ -116,7 +116,7 @@ func newHTTPForwarder(config *Config, settings component.TelemetrySettings) (ext return nil, errors.New("'egress.endpoint' config option cannot be empty") } - var url, err = url.Parse(config.Egress.Endpoint) + url, err := url.Parse(config.Egress.Endpoint) if err != nil { return nil, fmt.Errorf("enter a valid URL for 'egress.endpoint': %w", err) } diff --git a/extension/httpforwarderextension/extension_test.go b/extension/httpforwarderextension/extension_test.go index fb2106413a32..c398a70595bc 100644 --- a/extension/httpforwarderextension/extension_test.go +++ b/extension/httpforwarderextension/extension_test.go @@ -266,7 +266,7 @@ func readBody(body io.ReadCloser) []byte { } func getParsedURL(t *testing.T, rawURL string) *url.URL { - var url, err = url.Parse(rawURL) + url, err := url.Parse(rawURL) require.NoError(t, err) return url } diff --git a/extension/httpforwarderextension/go.mod b/extension/httpforwarderextension/go.mod index 76cbf2e64cf3..a0d41ceff627 100644 --- a/extension/httpforwarderextension/go.mod +++ b/extension/httpforwarderextension/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/extension/httpforwarderextension/go.sum b/extension/httpforwarderextension/go.sum index 88347e4512cc..2af10d5dddcf 100644 --- a/extension/httpforwarderextension/go.sum +++ b/extension/httpforwarderextension/go.sum @@ -53,8 +53,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/extension/jaegerremotesampling/go.mod b/extension/jaegerremotesampling/go.mod index 603cfbcc594d..16c91fa92cf5 100644 --- a/extension/jaegerremotesampling/go.mod +++ b/extension/jaegerremotesampling/go.mod @@ -7,7 +7,7 @@ require ( github.com/jaegertracing/jaeger v1.62.0 github.com/jonboulle/clockwork v0.4.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/extension/jaegerremotesampling/go.sum b/extension/jaegerremotesampling/go.sum index 401d4185b4b8..c11952563b44 100644 --- a/extension/jaegerremotesampling/go.sum +++ b/extension/jaegerremotesampling/go.sum @@ -105,8 +105,9 @@ github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/ 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/extension/jaegerremotesampling/internal/grpc_test.go b/extension/jaegerremotesampling/internal/grpc_test.go index 931a88b08af0..40cc01de9998 100644 --- a/extension/jaegerremotesampling/internal/grpc_test.go +++ b/extension/jaegerremotesampling/internal/grpc_test.go @@ -94,9 +94,11 @@ func (g *grpcServerMock) Serve(_ net.Listener) error { g.quit = make(chan bool) return nil } + func (g *grpcServerMock) Stop() { g.quit <- true } + func (g *grpcServerMock) GracefulStop() { select { case <-g.quit: diff --git a/extension/jaegerremotesampling/internal/http.go b/extension/jaegerremotesampling/internal/http.go index 6bd406c0ef42..6ab9f75cba78 100644 --- a/extension/jaegerremotesampling/internal/http.go +++ b/extension/jaegerremotesampling/internal/http.go @@ -18,9 +18,7 @@ import ( "go.opentelemetry.io/collector/config/confighttp" ) -var ( - errMissingStrategyStore = errors.New("the strategy store has not been provided") -) +var errMissingStrategyStore = errors.New("the strategy store has not been provided") var _ component.Component = (*SamplingHTTPServer)(nil) diff --git a/extension/oauth2clientauthextension/config.go b/extension/oauth2clientauthextension/config.go index ea99916f4d73..ad4758052d2f 100644 --- a/extension/oauth2clientauthextension/config.go +++ b/extension/oauth2clientauthextension/config.go @@ -21,7 +21,6 @@ var ( // Config stores the configuration for OAuth2 Client Credentials (2-legged OAuth2 flow) setup. type Config struct { - // ClientID is the application's ID. // See https://datatracker.ietf.org/doc/html/rfc6749#section-2.2 ClientID string `mapstructure:"client_id"` diff --git a/extension/oauth2clientauthextension/go.mod b/extension/oauth2clientauthextension/go.mod index c449f70da3c1..d1d83f466c79 100644 --- a/extension/oauth2clientauthextension/go.mod +++ b/extension/oauth2clientauthextension/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configopaque v1.20.0 diff --git a/extension/oauth2clientauthextension/go.sum b/extension/oauth2clientauthextension/go.sum index dcd86469cc33..258117add514 100644 --- a/extension/oauth2clientauthextension/go.sum +++ b/extension/oauth2clientauthextension/go.sum @@ -37,8 +37,8 @@ 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/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/extension/observer/cfgardenobserver/go.mod b/extension/observer/cfgardenobserver/go.mod index 04f4ede2a1d6..b93617a3f8da 100644 --- a/extension/observer/cfgardenobserver/go.mod +++ b/extension/observer/cfgardenobserver/go.mod @@ -6,7 +6,7 @@ require ( code.cloudfoundry.org/garden v0.0.0-20241023020423-a21e43a17f84 github.com/cloudfoundry/go-cfclient/v3 v3.0.0-alpha.9 github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/extension/observer/cfgardenobserver/go.sum b/extension/observer/cfgardenobserver/go.sum index 42f710bbd3c0..b548dec6b53b 100644 --- a/extension/observer/cfgardenobserver/go.sum +++ b/extension/observer/cfgardenobserver/go.sum @@ -70,8 +70,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tedsuo/rata v1.0.0 h1:Sf9aZrYy6ElSTncjnGkyC2yuVvz5YJetBIUKJ4CmeKE= github.com/tedsuo/rata v1.0.0/go.mod h1:X47ELzhOoLbfFIY0Cql9P6yo3Cdwf2CMX3FVZxRzJPc= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/extension/observer/dockerobserver/go.mod b/extension/observer/dockerobserver/go.mod index d13f09b45dc7..23e7a2648173 100644 --- a/extension/observer/dockerobserver/go.mod +++ b/extension/observer/dockerobserver/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.34.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/extension/observer/dockerobserver/go.sum b/extension/observer/dockerobserver/go.sum index 9c03fccd593b..25f143a7e42f 100644 --- a/extension/observer/dockerobserver/go.sum +++ b/extension/observer/dockerobserver/go.sum @@ -115,8 +115,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/extension/observer/ecsobserver/config.go b/extension/observer/ecsobserver/config.go index 0633995a25db..15615c1b3770 100644 --- a/extension/observer/ecsobserver/config.go +++ b/extension/observer/ecsobserver/config.go @@ -17,7 +17,6 @@ const ( ) type Config struct { - // ClusterName is the target ECS cluster name for service discovery. ClusterName string `mapstructure:"cluster_name" yaml:"cluster_name"` // ClusterRegion is the target ECS cluster's AWS region. diff --git a/extension/observer/ecsobserver/fetcher.go b/extension/observer/ecsobserver/fetcher.go index 4276ddfacf6f..f69dcf5223fa 100644 --- a/extension/observer/ecsobserver/fetcher.go +++ b/extension/observer/ecsobserver/fetcher.go @@ -289,7 +289,8 @@ func (f *taskFetcher) attachContainerInstance(ctx context.Context, tasks []*task // Run ecs.DescribeContainerInstances and ec2.DescribeInstances for a batch (less than 100 container instances). func (f *taskFetcher) describeContainerInstances(ctx context.Context, instanceList []*string, - ci2EC2 map[string]*ec2.Instance) error { + ci2EC2 map[string]*ec2.Instance, +) error { // Get container instances res, err := f.ecs.DescribeContainerInstancesWithContext(ctx, &ecs.DescribeContainerInstancesInput{ Cluster: aws.String(f.cluster), diff --git a/extension/observer/ecsobserver/go.mod b/extension/observer/ecsobserver/go.mod index 75b5a1a818a4..063b3e10aff7 100644 --- a/extension/observer/ecsobserver/go.mod +++ b/extension/observer/ecsobserver/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/aws/aws-sdk-go v1.55.5 github.com/hashicorp/golang-lru/v2 v2.0.7 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/extension/observer/ecsobserver/go.sum b/extension/observer/ecsobserver/go.sum index c70cb098a22f..0284f8689626 100644 --- a/extension/observer/ecsobserver/go.sum +++ b/extension/observer/ecsobserver/go.sum @@ -43,8 +43,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/extension/observer/ecsobserver/internal/ecsmock/service.go b/extension/observer/ecsobserver/internal/ecsmock/service.go index 1d9dc1050d74..77ac558cd5e3 100644 --- a/extension/observer/ecsobserver/internal/ecsmock/service.go +++ b/extension/observer/ecsobserver/internal/ecsmock/service.go @@ -26,7 +26,6 @@ type PageLimit struct { DescribeServiceInput int // max 10 DescribeContainerInstanceInput int // max 100 DescribeInstanceOutput int // max 1000 - } func DefaultPageLimit() PageLimit { diff --git a/extension/observer/ecsobserver/sd.go b/extension/observer/ecsobserver/sd.go index cbf49bfa9f6f..234a7e181704 100644 --- a/extension/observer/ecsobserver/sd.go +++ b/extension/observer/ecsobserver/sd.go @@ -83,7 +83,7 @@ func (s *serviceDiscovery) runAndWriteFile(ctx context.Context) error { return err } // NOTE: We assume the folder already exists and does NOT try to create one. - if err := os.WriteFile(s.cfg.ResultFile, b, 0600); err != nil { + if err := os.WriteFile(s.cfg.ResultFile, b, 0o600); err != nil { return err } } diff --git a/extension/observer/ecsobserver/target.go b/extension/observer/ecsobserver/target.go index 70f8d0bb66a3..710ef631a2f7 100644 --- a/extension/observer/ecsobserver/target.go +++ b/extension/observer/ecsobserver/target.go @@ -121,9 +121,7 @@ func trimEmptyValueByKeyPrefix(m map[string]string, prefix string) { } } -var ( - invalidLabelCharRE = regexp.MustCompile(`[^a-zA-Z0-9_]`) -) +var invalidLabelCharRE = regexp.MustCompile(`[^a-zA-Z0-9_]`) // Copied from https://github.com/prometheus/prometheus/blob/8d2a8f493905e46fe6181e8c1b79ccdfcbdb57fc/util/strutil/strconv.go#L40-L44 func sanitizeLabelName(s string) string { diff --git a/extension/observer/ecstaskobserver/extension.go b/extension/observer/ecstaskobserver/extension.go index c800f86cc389..e74394d22771 100644 --- a/extension/observer/ecstaskobserver/extension.go +++ b/extension/observer/ecstaskobserver/extension.go @@ -19,9 +19,11 @@ import ( const runningStatus = "RUNNING" -var _ extension.Extension = (*ecsTaskObserver)(nil) -var _ observer.EndpointsLister = (*ecsTaskObserver)(nil) -var _ observer.Observable = (*ecsTaskObserver)(nil) +var ( + _ extension.Extension = (*ecsTaskObserver)(nil) + _ observer.EndpointsLister = (*ecsTaskObserver)(nil) + _ observer.Observable = (*ecsTaskObserver)(nil) +) type ecsTaskObserver struct { extension.Extension @@ -97,7 +99,6 @@ func (e *ecsTaskObserver) portFromLabels(labels map[string]string) uint16 { for _, portLabel := range e.config.PortLabels { if p, ok := labels[portLabel]; ok { port, err := strconv.ParseUint(p, 10, 16) - if err != nil { e.telemetry.Logger.Warn("failed parsing port label", zap.String("label", portLabel), zap.Error(err)) continue diff --git a/extension/observer/ecstaskobserver/go.mod b/extension/observer/ecstaskobserver/go.mod index 978bec84c3cc..1fedbfee7dad 100644 --- a/extension/observer/ecstaskobserver/go.mod +++ b/extension/observer/ecstaskobserver/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 diff --git a/extension/observer/ecstaskobserver/go.sum b/extension/observer/ecstaskobserver/go.sum index ce08f6f18a41..ffd067e9336a 100644 --- a/extension/observer/ecstaskobserver/go.sum +++ b/extension/observer/ecstaskobserver/go.sum @@ -53,8 +53,8 @@ github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/extension/observer/go.mod b/extension/observer/go.mod index 49d063196797..1b7a73413878 100644 --- a/extension/observer/go.mod +++ b/extension/observer/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/obser go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.uber.org/zap v1.27.0 ) diff --git a/extension/observer/go.sum b/extension/observer/go.sum index 6326c87f43a8..b3a5565664bc 100644 --- a/extension/observer/go.sum +++ b/extension/observer/go.sum @@ -16,8 +16,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/extension/observer/hostobserver/extension_test.go b/extension/observer/hostobserver/extension_test.go index e46aed434c2c..964136b84a4b 100644 --- a/extension/observer/hostobserver/extension_test.go +++ b/extension/observer/hostobserver/extension_test.go @@ -155,7 +155,8 @@ func getExpectedHost(host string, isIPv6 bool) string { func startAndStopObserver( t *testing.T, - getConnectionsOverride func() (conns []psnet.ConnectionStat, err error)) mockNotifier { + getConnectionsOverride func() (conns []psnet.ConnectionStat, err error), +) mockNotifier { ml := endpointsLister{ logger: zap.NewNop(), observerName: "host_observer/1", diff --git a/extension/observer/hostobserver/go.mod b/extension/observer/hostobserver/go.mod index eea8f5794f25..141d26b1aeaa 100644 --- a/extension/observer/hostobserver/go.mod +++ b/extension/observer/hostobserver/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.114.0 github.com/shirou/gopsutil/v4 v4.24.10 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/extension/observer/hostobserver/go.sum b/extension/observer/hostobserver/go.sum index ad94d62399bd..36ae18e53f60 100644 --- a/extension/observer/hostobserver/go.sum +++ b/extension/observer/hostobserver/go.sum @@ -46,8 +46,8 @@ github.com/shirou/gopsutil/v4 v4.24.10 h1:7VOzPtfw/5YDU+jLEoBwXwxJbQetULywoSV4RY github.com/shirou/gopsutil/v4 v4.24.10/go.mod h1:s4D/wg+ag4rG0WO7AiTj2BeYCRhym0vM7DHbZRxnIT8= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/extension/observer/k8sobserver/extension.go b/extension/observer/k8sobserver/extension.go index ddb663c1955b..907b770e73fe 100644 --- a/extension/observer/k8sobserver/extension.go +++ b/extension/observer/k8sobserver/extension.go @@ -21,8 +21,10 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig" ) -var _ extension.Extension = (*k8sObserver)(nil) -var _ observer.Observable = (*k8sObserver)(nil) +var ( + _ extension.Extension = (*k8sObserver)(nil) + _ observer.Observable = (*k8sObserver)(nil) +) type k8sObserver struct { *observer.EndpointsWatcher @@ -111,7 +113,7 @@ func newObserver(config *Config, set extension.Settings) (extension.Extension, e var serviceListerWatcher cache.ListerWatcher if config.ObserveServices { - var serviceSelector = fields.Everything() + serviceSelector := fields.Everything() set.Logger.Debug("observing services") serviceListerWatcher = cache.NewListWatchFromClient(restClient, "services", v1.NamespaceAll, serviceSelector) } @@ -130,7 +132,7 @@ func newObserver(config *Config, set extension.Settings) (extension.Extension, e var ingressListerWatcher cache.ListerWatcher if config.ObserveIngresses { - var ingressSelector = fields.Everything() + ingressSelector := fields.Everything() set.Logger.Debug("observing ingresses") ingressListerWatcher = cache.NewListWatchFromClient(client.NetworkingV1().RESTClient(), "ingresses", v1.NamespaceAll, ingressSelector) } diff --git a/extension/observer/k8sobserver/go.mod b/extension/observer/k8sobserver/go.mod index 03f0087a61c1..904a5a5ba122 100644 --- a/extension/observer/k8sobserver/go.mod +++ b/extension/observer/k8sobserver/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 @@ -13,9 +13,9 @@ require ( go.opentelemetry.io/collector/extension/extensiontest v0.114.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - k8s.io/api v0.31.2 - k8s.io/apimachinery v0.31.2 - k8s.io/client-go v0.31.2 + k8s.io/api v0.31.3 + k8s.io/apimachinery v0.31.3 + k8s.io/client-go v0.31.3 ) require ( diff --git a/extension/observer/k8sobserver/go.sum b/extension/observer/k8sobserver/go.sum index 45672fc82124..34b021400c15 100644 --- a/extension/observer/k8sobserver/go.sum +++ b/extension/observer/k8sobserver/go.sum @@ -244,8 +244,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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -534,14 +534,14 @@ 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.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= -k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= -k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= -k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= 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= diff --git a/extension/observer/k8sobserver/handler.go b/extension/observer/k8sobserver/handler.go index f1c89bb24b4b..7e1e64c03f21 100644 --- a/extension/observer/k8sobserver/handler.go +++ b/extension/observer/k8sobserver/handler.go @@ -15,8 +15,10 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer" ) -var _ cache.ResourceEventHandler = (*handler)(nil) -var _ observer.EndpointsLister = (*handler)(nil) +var ( + _ cache.ResourceEventHandler = (*handler)(nil) + _ observer.EndpointsLister = (*handler)(nil) +) // handler handles k8s cache informer callbacks. type handler struct { diff --git a/extension/observer/k8sobserver/handler_test.go b/extension/observer/k8sobserver/handler_test.go index d93275eb2ff3..5e74264c1707 100644 --- a/extension/observer/k8sobserver/handler_test.go +++ b/extension/observer/k8sobserver/handler_test.go @@ -48,7 +48,10 @@ func TestPodEndpointsAdded(t *testing.T) { Name: "pod-2", Namespace: "default", UID: "pod-2-UID", - Labels: map[string]string{"env": "prod"}}}}, + Labels: map[string]string{"env": "prod"}, + }, + }, + }, { ID: "test-1/pod-2-UID/https(443)", Target: "1.2.3.4:443", @@ -63,7 +66,8 @@ func TestPodEndpointsAdded(t *testing.T) { Port: 443, Transport: observer.ProtocolTCP, }, - }}, th.ListEndpoints()) + }, + }, th.ListEndpoints()) } func TestPodEndpointsRemoved(t *testing.T) { @@ -102,7 +106,9 @@ func TestPodEndpointsChanged(t *testing.T) { Name: "pod-2", Namespace: "default", UID: "pod-2-UID", - Labels: map[string]string{"env": "prod", "updated-label": "true"}}}, + Labels: map[string]string{"env": "prod", "updated-label": "true"}, + }, + }, { ID: "test-1/pod-2-UID/container-2", Target: "1.2.3.4", @@ -114,7 +120,10 @@ func TestPodEndpointsChanged(t *testing.T) { Name: "pod-2", Namespace: "default", UID: "pod-2-UID", - Labels: map[string]string{"env": "prod", "updated-label": "true"}}}}, + Labels: map[string]string{"env": "prod", "updated-label": "true"}, + }, + }, + }, { ID: "test-1/pod-2-UID/https(443)", Target: "1.2.3.4:443", @@ -123,9 +132,12 @@ func TestPodEndpointsChanged(t *testing.T) { Name: "pod-2", Namespace: "default", UID: "pod-2-UID", - Labels: map[string]string{"env": "prod", "updated-label": "true"}}, + Labels: map[string]string{"env": "prod", "updated-label": "true"}, + }, Port: 443, - Transport: observer.ProtocolTCP}}, + Transport: observer.ProtocolTCP, + }, + }, }, th.ListEndpoints()) } @@ -144,7 +156,8 @@ func TestServiceEndpointsAdded(t *testing.T) { ServiceType: "ClusterIP", ClusterIP: "1.2.3.4", }, - }}, th.ListEndpoints()) + }, + }, th.ListEndpoints()) } func TestServiceEndpointsRemoved(t *testing.T) { @@ -186,7 +199,8 @@ func TestServiceEndpointsChanged(t *testing.T) { Labels: map[string]string{"env": "prod", "updated-label": "true"}, ServiceType: "ClusterIP", ClusterIP: "1.2.3.4", - }}, + }, + }, }, th.ListEndpoints()) } @@ -206,7 +220,8 @@ func TestIngressEndpointsAdded(t *testing.T) { Host: "host-1", Path: "/", }, - }}, th.ListEndpoints()) + }, + }, th.ListEndpoints()) } func TestIngressEndpointsRemoved(t *testing.T) { diff --git a/extension/observer/k8sobserver/k8s_fixtures_test.go b/extension/observer/k8sobserver/k8s_fixtures_test.go index 506b2c27b42c..4ba6d62ee79e 100644 --- a/extension/observer/k8sobserver/k8s_fixtures_test.go +++ b/extension/observer/k8sobserver/k8s_fixtures_test.go @@ -39,12 +39,14 @@ func newPod(name, host string) *v1.Pod { return pod } -var pod1V1 = newPod("pod1", "localhost") -var pod1V2 = func() *v1.Pod { - pod := pod1V1.DeepCopy() - pod.Labels["pod-version"] = "2" - return pod -}() +var ( + pod1V1 = newPod("pod1", "localhost") + pod1V2 = func() *v1.Pod { + pod := pod1V1.DeepCopy() + pod.Labels["pod-version"] = "2" + return pod + }() +) var container1 = v1.Container{ Name: "container-1", @@ -276,9 +278,11 @@ func newNode(name, hostname string) *v1.Node { } } -var node1V1 = newNode("node1", "localhost") -var node1V2 = func() *v1.Node { - node := node1V1.DeepCopy() - node.Labels["node-version"] = "2" - return node -}() +var ( + node1V1 = newNode("node1", "localhost") + node1V2 = func() *v1.Node { + node := node1V1.DeepCopy() + node.Labels["node-version"] = "2" + return node + }() +) diff --git a/extension/observer/k8sobserver/pod_endpoint_test.go b/extension/observer/k8sobserver/pod_endpoint_test.go index d28953f982aa..8adeb20cab8d 100644 --- a/extension/observer/k8sobserver/pod_endpoint_test.go +++ b/extension/observer/k8sobserver/pod_endpoint_test.go @@ -20,7 +20,9 @@ func TestPodObjectToPortEndpoint(t *testing.T) { Name: "pod-2", Namespace: "default", UID: "pod-2-UID", - Labels: map[string]string{"env": "prod"}}}, + Labels: map[string]string{"env": "prod"}, + }, + }, { ID: "namespace/pod-2-UID/container-2", Target: "1.2.3.4", @@ -32,7 +34,10 @@ func TestPodObjectToPortEndpoint(t *testing.T) { Name: "pod-2", Namespace: "default", UID: "pod-2-UID", - Labels: map[string]string{"env": "prod"}}}}, + Labels: map[string]string{"env": "prod"}, + }, + }, + }, { ID: "namespace/pod-2-UID/https(443)", Target: "1.2.3.4:443", @@ -41,9 +46,12 @@ func TestPodObjectToPortEndpoint(t *testing.T) { Name: "pod-2", Namespace: "default", UID: "pod-2-UID", - Labels: map[string]string{"env": "prod"}}, + Labels: map[string]string{"env": "prod"}, + }, Port: 443, - Transport: observer.ProtocolTCP}}, + Transport: observer.ProtocolTCP, + }, + }, } endpoints := convertPodToEndpoints("namespace", podWithNamedPorts) diff --git a/extension/observer/k8sobserver/service_endpoint_test.go b/extension/observer/k8sobserver/service_endpoint_test.go index 391fd448b633..beda83a74c45 100644 --- a/extension/observer/k8sobserver/service_endpoint_test.go +++ b/extension/observer/k8sobserver/service_endpoint_test.go @@ -23,7 +23,8 @@ func TestServiceObjectToEndpoint(t *testing.T) { Labels: map[string]string{"env": "prod"}, ServiceType: "ClusterIP", ClusterIP: "1.2.3.4", - }}, + }, + }, } endpoints := convertServiceToEndpoints("namespace", serviceWithClusterIP) diff --git a/extension/oidcauthextension/config.go b/extension/oidcauthextension/config.go index 327baea5365f..ff4ef3cdd42f 100644 --- a/extension/oidcauthextension/config.go +++ b/extension/oidcauthextension/config.go @@ -5,7 +5,6 @@ package oidcauthextension // import "github.com/open-telemetry/opentelemetry-col // Config has the configuration for the OIDC Authenticator extension. type Config struct { - // The attribute (header name) to look for auth data. Optional, default value: "authorization". Attribute string `mapstructure:"attribute"` diff --git a/extension/oidcauthextension/go.mod b/extension/oidcauthextension/go.mod index 48a381dee501..3653ea747815 100644 --- a/extension/oidcauthextension/go.mod +++ b/extension/oidcauthextension/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/coreos/go-oidc/v3 v3.11.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/client v1.20.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/extension/oidcauthextension/go.sum b/extension/oidcauthextension/go.sum index 042077eb3038..da38214f8823 100644 --- a/extension/oidcauthextension/go.sum +++ b/extension/oidcauthextension/go.sum @@ -43,8 +43,8 @@ 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/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/extension/opampextension/auth_test.go b/extension/opampextension/auth_test.go index 15f2c64bb9da..e8447d693b06 100644 --- a/extension/opampextension/auth_test.go +++ b/extension/opampextension/auth_test.go @@ -113,6 +113,7 @@ func (m mockAuthClient) RoundTripper(base http.RoundTripper) (http.RoundTripper, base: base, }, nil } + func (mockAuthClient) PerRPCCredentials() (credentials.PerRPCCredentials, error) { return nil, nil } diff --git a/extension/opampextension/go.mod b/extension/opampextension/go.mod index 7af6b320160a..36d3e333c712 100644 --- a/extension/opampextension/go.mod +++ b/extension/opampextension/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opamp-go v0.17.0 github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampcustommessages v0.114.0 github.com/shirou/gopsutil/v4 v4.24.10 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/extension/opampextension/go.sum b/extension/opampextension/go.sum index 679181ce1044..2808afe6d670 100644 --- a/extension/opampextension/go.sum +++ b/extension/opampextension/go.sum @@ -55,8 +55,8 @@ github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDN github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= github.com/shirou/gopsutil/v4 v4.24.10 h1:7VOzPtfw/5YDU+jLEoBwXwxJbQetULywoSV4RYY7HkM= github.com/shirou/gopsutil/v4 v4.24.10/go.mod h1:s4D/wg+ag4rG0WO7AiTj2BeYCRhym0vM7DHbZRxnIT8= -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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU= github.com/tklauser/go-sysconf v0.3.14/go.mod h1:1ym4lWMLUOhuBOPGtRcJm7tEGX4SCYNEEEtghGG/8uY= github.com/tklauser/numcpus v0.8.0 h1:Mx4Wwe/FjZLeQsK/6kt2EOepwwSl7SmJrK5bV/dXYgY= diff --git a/extension/opampextension/opamp_agent.go b/extension/opampextension/opamp_agent.go index 3f16aa7f3349..3482dc4fc071 100644 --- a/extension/opampextension/opamp_agent.go +++ b/extension/opampextension/opamp_agent.go @@ -64,9 +64,11 @@ type opampAgent struct { customCapabilityRegistry *customCapabilityRegistry } -var _ opampcustommessages.CustomCapabilityRegistry = (*opampAgent)(nil) -var _ extensioncapabilities.Dependent = (*opampAgent)(nil) -var _ extensioncapabilities.ConfigWatcher = (*opampAgent)(nil) +var ( + _ opampcustommessages.CustomCapabilityRegistry = (*opampAgent)(nil) + _ extensioncapabilities.Dependent = (*opampAgent)(nil) + _ extensioncapabilities.ConfigWatcher = (*opampAgent)(nil) +) func (o *opampAgent) Start(ctx context.Context, host component.Host) error { o.reportFunc = func(event *componentstatus.Event) { diff --git a/extension/pprofextension/config.go b/extension/pprofextension/config.go index b289e2a05b52..0ab9149c6f67 100644 --- a/extension/pprofextension/config.go +++ b/extension/pprofextension/config.go @@ -11,7 +11,6 @@ import ( // Config has the configuration for the extension enabling the golang // net/http/pprof (Performance Profiler) extension. 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. diff --git a/extension/pprofextension/go.mod b/extension/pprofextension/go.mod index 45d00f05067a..09e495ab492a 100644 --- a/extension/pprofextension/go.mod +++ b/extension/pprofextension/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/extension/pprofextension/go.sum b/extension/pprofextension/go.sum index 8bedafe4abdd..cec8b607bc9d 100644 --- a/extension/pprofextension/go.sum +++ b/extension/pprofextension/go.sum @@ -35,8 +35,8 @@ 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/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/extension/remotetapextension/go.mod b/extension/remotetapextension/go.mod index 7eab040bcdb2..7c3fb9ef9370 100644 --- a/extension/remotetapextension/go.mod +++ b/extension/remotetapextension/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/remot go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/extension/remotetapextension/go.sum b/extension/remotetapextension/go.sum index 64ff21c01ee6..343ce6fb9a7d 100644 --- a/extension/remotetapextension/go.sum +++ b/extension/remotetapextension/go.sum @@ -51,8 +51,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/extension/sigv4authextension/go.mod b/extension/sigv4authextension/go.mod index ad064bf0822e..6a1537e3444d 100644 --- a/extension/sigv4authextension/go.mod +++ b/extension/sigv4authextension/go.mod @@ -7,7 +7,7 @@ require ( github.com/aws/aws-sdk-go-v2/config v1.28.5 github.com/aws/aws-sdk-go-v2/credentials v1.17.46 github.com/aws/aws-sdk-go-v2/service/sts v1.33.1 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/extension/sigv4authextension/go.sum b/extension/sigv4authextension/go.sum index e57e354556a0..b774ec5efa03 100644 --- a/extension/sigv4authextension/go.sum +++ b/extension/sigv4authextension/go.sum @@ -59,8 +59,8 @@ 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/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/extension/solarwindsapmsettingsextension/extension.go b/extension/solarwindsapmsettingsextension/extension.go index 9e81b1cadb8e..67804da75bb5 100644 --- a/extension/solarwindsapmsettingsextension/extension.go +++ b/extension/solarwindsapmsettingsextension/extension.go @@ -165,7 +165,7 @@ func refresh(extension *solarwindsapmSettingsExtension, filename string) { if content, err := json.Marshal(settings); err != nil { extension.telemetrySettings.Logger.Error("unable to marshal setting JSON[] byte from settings", zap.Error(err)) } else { - if err := os.WriteFile(filename, content, 0600); err != nil { + if err := os.WriteFile(filename, content, 0o600); err != nil { extension.telemetrySettings.Logger.Error("unable to write "+filename, zap.Error(err)) } else { if len(response.GetWarning()) > 0 { diff --git a/extension/solarwindsapmsettingsextension/go.mod b/extension/solarwindsapmsettingsextension/go.mod index f670a70a5958..954ecb75ff4e 100644 --- a/extension/solarwindsapmsettingsextension/go.mod +++ b/extension/solarwindsapmsettingsextension/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/google/uuid v1.6.0 github.com/solarwindscloud/apm-proto v1.0.8 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configgrpc v0.114.0 diff --git a/extension/solarwindsapmsettingsextension/go.sum b/extension/solarwindsapmsettingsextension/go.sum index 740ee5c4f407..574ac5d91632 100644 --- a/extension/solarwindsapmsettingsextension/go.sum +++ b/extension/solarwindsapmsettingsextension/go.sum @@ -51,8 +51,8 @@ github.com/solarwindscloud/apm-proto v1.0.8 h1:a5A0s+5RmMB6LNBs32qQ+oL26rltw5b2c github.com/solarwindscloud/apm-proto v1.0.8/go.mod h1:PIMzXc8HpB0ryT4Oci4pUz8F0m1X7Q/hVXkQE4jGv6Y= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/extension/storage/dbstorage/go.mod b/extension/storage/dbstorage/go.mod index 772ddebe577e..56e86a2f3ca7 100644 --- a/extension/storage/dbstorage/go.mod +++ b/extension/storage/dbstorage/go.mod @@ -7,7 +7,7 @@ require ( github.com/docker/go-connections v0.5.0 github.com/jackc/pgx/v5 v5.7.1 github.com/mattn/go-sqlite3 v1.14.24 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.33.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/extension/storage/dbstorage/go.sum b/extension/storage/dbstorage/go.sum index 6a37a2b2e015..984c35ca4645 100644 --- a/extension/storage/dbstorage/go.sum +++ b/extension/storage/dbstorage/go.sum @@ -122,8 +122,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.33.0 h1:zJS9PfXYT5O0ZFXM2xxXfk4J5UMw/kRiISng037Gxdw= github.com/testcontainers/testcontainers-go v0.33.0/go.mod h1:W80YpTa8D5C3Yy16icheD01UTDu+LmXIA2Keo+jWtT8= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/extension/storage/filestorage/client.go b/extension/storage/filestorage/client.go index b97cad73c044..bff4b03d283d 100644 --- a/extension/storage/filestorage/client.go +++ b/extension/storage/filestorage/client.go @@ -50,7 +50,7 @@ func bboltOptions(timeout time.Duration, noSync bool) *bbolt.Options { 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) + db, err := bbolt.Open(filePath, 0o600, options) if err != nil { return nil, err } @@ -188,7 +188,7 @@ func (c *fileStorageClient) Compact(compactionDirectory string, timeout time.Dur zap.String(tempDirectoryKey, file.Name())) // cannot reuse newClient as db shouldn't contain any bucket - compactedDb, err = bbolt.Open(file.Name(), 0600, options) + compactedDb, err = bbolt.Open(file.Name(), 0o600, options) if err != nil { return err } @@ -209,7 +209,7 @@ func (c *fileStorageClient) Compact(compactionDirectory string, timeout time.Dur // replace current db file with compacted db file // we reopen the DB file irrespective of the success of the replace, as we can't leave it closed moveErr := moveFileWithFallback(compactedDbPath, dbPath) - c.db, openErr = bbolt.Open(dbPath, 0600, options) + c.db, openErr = bbolt.Open(dbPath, 0o600, options) // if we got errors for both rename and open, we'd rather return the open one // this should not happen in any kind of normal circumstance - maybe we should panic instead? @@ -337,7 +337,7 @@ func moveFileWithFallback(src string, dest string) error { return err } - if err = os.WriteFile(dest, data, 0600); err != nil { + if err = os.WriteFile(dest, data, 0o600); err != nil { return err } diff --git a/extension/storage/filestorage/config.go b/extension/storage/filestorage/config.go index 8e665d6ad7d8..ef842a93b616 100644 --- a/extension/storage/filestorage/config.go +++ b/extension/storage/filestorage/config.go @@ -12,8 +12,10 @@ import ( "time" ) -var errInvalidOctal = errors.New("directory_permissions value must be a valid octal representation") -var errInvalidPermissionBits = errors.New("directory_permissions contain invalid bits for file access") +var ( + errInvalidOctal = errors.New("directory_permissions value must be a valid octal representation") + errInvalidPermissionBits = errors.New("directory_permissions contain invalid bits for file access") +) // Config defines configuration for file storage extension. type Config struct { diff --git a/extension/storage/filestorage/config_test.go b/extension/storage/filestorage/config_test.go index 8f14a3ec88fc..8fad1509698f 100644 --- a/extension/storage/filestorage/config_test.go +++ b/extension/storage/filestorage/config_test.go @@ -99,6 +99,7 @@ func TestHandleProvidingFilePathAsDirWithAnError(t *testing.T) { require.Error(t, err) require.EqualError(t, err, file.Name()+" is not a directory") } + func TestDirectoryCreateConfig(t *testing.T) { tests := []struct { name string diff --git a/extension/storage/filestorage/extension.go b/extension/storage/filestorage/extension.go index 4b8650892359..f26474e936c9 100644 --- a/extension/storage/filestorage/extension.go +++ b/extension/storage/filestorage/extension.go @@ -72,7 +72,6 @@ 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) - if err != nil { return nil, err } diff --git a/extension/storage/filestorage/extension_test.go b/extension/storage/filestorage/extension_test.go index dd49cf9a2295..10f9b9a473a2 100644 --- a/extension/storage/filestorage/extension_test.go +++ b/extension/storage/filestorage/extension_test.go @@ -551,9 +551,9 @@ func TestDirectoryCreation(t *testing.T) { require.NoError(t, err) var expectedFileMode os.FileMode if runtime.GOOS == "windows" { // on Windows, we get 0777 for writable directories - expectedFileMode = os.FileMode(0777) + expectedFileMode = os.FileMode(0o777) } else { - expectedFileMode = os.FileMode(0750) + expectedFileMode = os.FileMode(0o750) } require.Equal(t, expectedFileMode, s.Mode()&os.ModePerm) }, @@ -576,9 +576,9 @@ func TestDirectoryCreation(t *testing.T) { require.NoError(t, err) var expectedFileMode os.FileMode if runtime.GOOS == "windows" { // on Windows, we get 0777 for writable directories - expectedFileMode = os.FileMode(0777) + expectedFileMode = os.FileMode(0o777) } else { - expectedFileMode = os.FileMode(0700) + expectedFileMode = os.FileMode(0o700) } require.Equal(t, expectedFileMode, s.Mode()&os.ModePerm) }, diff --git a/extension/storage/filestorage/go.mod b/extension/storage/filestorage/go.mod index 1d11460bda25..9295ad33e9e6 100644 --- a/extension/storage/filestorage/go.mod +++ b/extension/storage/filestorage/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/google/uuid v1.6.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.etcd.io/bbolt v1.3.11 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/extension/storage/filestorage/go.sum b/extension/storage/filestorage/go.sum index 2b15e302f00f..e12280e51991 100644 --- a/extension/storage/filestorage/go.sum +++ b/extension/storage/filestorage/go.sum @@ -33,8 +33,8 @@ 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/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.11 h1:yGEzV1wPz2yVCLsD8ZAiGHhHVlczyC9d1rP43/VCRJ0= diff --git a/extension/storage/go.mod b/extension/storage/go.mod index d408c4628ff1..d4c9389fe8e8 100644 --- a/extension/storage/go.mod +++ b/extension/storage/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/stora go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/extension v0.114.0 diff --git a/extension/storage/go.sum b/extension/storage/go.sum index a6beb8fb4fac..76fe539e62a0 100644 --- a/extension/storage/go.sum +++ b/extension/storage/go.sum @@ -21,8 +21,8 @@ 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/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/extension/storage/redisstorageextension/go.mod b/extension/storage/redisstorageextension/go.mod index 03ce3dc7e05b..f4c2e5c654f5 100644 --- a/extension/storage/redisstorageextension/go.mod +++ b/extension/storage/redisstorageextension/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/redis/go-redis/v9 v9.7.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configopaque v1.20.0 diff --git a/extension/storage/redisstorageextension/go.sum b/extension/storage/redisstorageextension/go.sum index 50796b78c9fb..7f0db04d0d31 100644 --- a/extension/storage/redisstorageextension/go.sum +++ b/extension/storage/redisstorageextension/go.sum @@ -43,8 +43,8 @@ github.com/redis/go-redis/v9 v9.7.0 h1:HhLSs+B6O021gwzl+locl0zEDnyNkxMtf/Z3NNBMa github.com/redis/go-redis/v9 v9.7.0/go.mod h1:f6zhXITC7JUJIlPEiBOTXxJgPLdZcA93GewI7inzyWw= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/extension/storage/storagetest/client.go b/extension/storage/storagetest/client.go index 0b1a173fd836..97b99de4cfe4 100644 --- a/extension/storage/storagetest/client.go +++ b/extension/storage/storagetest/client.go @@ -16,9 +16,7 @@ import ( "go.opentelemetry.io/collector/extension/experimental/storage" ) -var ( - errClientClosed = errors.New("client closed") -) +var errClientClosed = errors.New("client closed") type TestClient struct { cache map[string][]byte @@ -139,7 +137,7 @@ func (p *TestClient) Close(_ context.Context) error { return err } - return os.WriteFile(p.storageFile, contents, os.FileMode(0600)) + return os.WriteFile(p.storageFile, contents, os.FileMode(0o600)) } const clientCreatorID = "client_creator_id" diff --git a/extension/sumologicextension/credentials/credentialsstore_localfs.go b/extension/sumologicextension/credentials/credentialsstore_localfs.go index 4d6283681582..1210d2abb1c0 100644 --- a/extension/sumologicextension/credentials/credentialsstore_localfs.go +++ b/extension/sumologicextension/credentials/credentialsstore_localfs.go @@ -133,7 +133,6 @@ func (cr LocalFsStore) Get(key string) (CollectorCredentials, error) { } creds, err := f(_getHasher(), key) - if err != nil { return CollectorCredentials{}, err } @@ -170,7 +169,7 @@ func (cr LocalFsStore) Store(key string, creds CollectorCredentials) error { return err } - if err = os.WriteFile(path, encryptedCreds, 0600); err != nil { + if err = os.WriteFile(path, encryptedCreds, 0o600); err != nil { return fmt.Errorf("failed to save credentials file '%s': %w", path, err, ) @@ -239,7 +238,7 @@ func (cr LocalFsStore) Validate() error { func ensureDir(path string) error { fi, err := os.Stat(path) if err != nil { - if err := os.Mkdir(path, 0700); err != nil { + if err := os.Mkdir(path, 0o700); err != nil { return err } return nil @@ -247,8 +246,8 @@ func ensureDir(path string) error { // 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 { + if fi.Mode().Perm() != 0o700 { + if err := os.Chmod(path, 0o700); err != nil { return err } } diff --git a/extension/sumologicextension/credentials/credentialsstore_localfs_test.go b/extension/sumologicextension/credentials/credentialsstore_localfs_test.go index e367b9a0586b..2f857894e69f 100644 --- a/extension/sumologicextension/credentials/credentialsstore_localfs_test.go +++ b/extension/sumologicextension/credentials/credentialsstore_localfs_test.go @@ -69,11 +69,11 @@ 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) + expectedFileMode = fs.FileMode(0o777) } else { - expectedFileMode = fs.FileMode(0700) + expectedFileMode = fs.FileMode(0o700) } - err := os.Mkdir(dir, 0400) + err := os.Mkdir(dir, 0o400) require.NoError(t, err) store, err := NewLocalFsStore(WithCredentialsDirectory(dir), WithLogger(zap.NewNop())) diff --git a/extension/sumologicextension/credentials/encrypt.go b/extension/sumologicextension/credentials/encrypt.go index 986e1aa8a094..8a9dd35412ab 100644 --- a/extension/sumologicextension/credentials/encrypt.go +++ b/extension/sumologicextension/credentials/encrypt.go @@ -83,7 +83,6 @@ func encrypt(data []byte, encryptionKey []byte) ([]byte, error) { } ret, err := f(_getHasher(), data, encryptionKey) - if err != nil { return ret, err } @@ -115,7 +114,6 @@ func decrypt(data []byte, encryptionKey []byte) ([]byte, error) { } ret, err := f(_getHasher(), data, encryptionKey) - if err != nil { return ret, err } diff --git a/extension/sumologicextension/extension.go b/extension/sumologicextension/extension.go index 13904c184cdc..1fd27cc04499 100644 --- a/extension/sumologicextension/extension.go +++ b/extension/sumologicextension/extension.go @@ -21,8 +21,8 @@ import ( "github.com/Showmax/go-fqdn" "github.com/cenkalti/backoff/v4" - ps "github.com/mitchellh/go-ps" "github.com/shirou/gopsutil/v4/host" + "github.com/shirou/gopsutil/v4/process" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/confighttp" @@ -76,6 +76,11 @@ const ( collectorCredentialIDField = "collector_credential_id" stickySessionKey = "AWSALB" + + activeMQJavaProcess = "activemq.jar" + cassandraJavaProcess = "org.apache.cassandra.service.CassandraDaemon" + dockerDesktopJavaProcess = "com.docker.backend" + jmxJavaProcess = "com.sun.management.jmxremote" ) const ( @@ -621,8 +626,10 @@ func (se *SumologicExtension) heartbeatLoop() { } } -var errUnauthorizedHeartbeat = errors.New("heartbeat unauthorized") -var errUnauthorizedMetadata = errors.New("metadata update unauthorized") +var ( + errUnauthorizedHeartbeat = errors.New("heartbeat unauthorized") + errUnauthorizedMetadata = errors.New("metadata update unauthorized") +) type ErrorAPI struct { status int @@ -698,7 +705,7 @@ var sumoAppProcesses = map[string]string{ "apache": "apache", "apache2": "apache", "httpd": "apache", - "docker": "docker", + "docker": "docker", // docker cli "elasticsearch": "elasticsearch", "mysql-server": "mysql", "mysqld": "mysql", @@ -709,21 +716,58 @@ var sumoAppProcesses = map[string]string{ "redis": "redis", "tomcat": "tomcat", "kafka-server-start.sh": "kafka", // Need to test this, most common shell wrapper. + "redis-server": "redis", + "mongod": "mongodb", + "cassandra": "cassandra", + "jmx": "jmx", + "activemq": "activemq", + "memcached": "memcached", + "haproxy": "haproxy", + "dockerd": "docker-ce", // docker engine, for when process runs natively + "com.docker.backend": "docker-ce", // docker daemon runs on a VM in Docker Desktop, process doesn't show on mac + "sqlservr": "mssql", // linux SQL Server process } func filteredProcessList() ([]string, error) { var pl []string - p, err := ps.Processes() + processes, err := process.Processes() if err != nil { return pl, err } - for _, v := range p { - e := strings.ToLower(v.Executable()) + for _, v := range processes { + e, err := v.Name() + if err != nil { + return nil, fmt.Errorf("Error getting executable name: %w", err) + } + e = strings.ToLower(e) + if a, i := sumoAppProcesses[e]; i { pl = append(pl, a) } + + // handling for Docker Desktop + if e == dockerDesktopJavaProcess { + pl = append(pl, "docker-ce") + } + + // handling Java background processes + if e == "java" { + cmdline, err := v.Cmdline() + if err != nil { + return nil, fmt.Errorf("error getting executable name for PID %d: %w", v.Pid, err) + } + + switch { + case strings.Contains(cmdline, cassandraJavaProcess): + pl = append(pl, "cassandra") + case strings.Contains(cmdline, jmxJavaProcess): + pl = append(pl, "jmx") + case strings.Contains(cmdline, activeMQJavaProcess): + pl = append(pl, "activemq") + } + } } return pl, nil diff --git a/extension/sumologicextension/extension_test.go b/extension/sumologicextension/extension_test.go index 3773e004a02e..5ea1377a654f 100644 --- a/extension/sumologicextension/extension_test.go +++ b/extension/sumologicextension/extension_test.go @@ -31,7 +31,6 @@ import ( func setupTestMain(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") } @@ -236,7 +235,7 @@ func TestStoreCredentials(t *testing.T) { cfg.CollectorCredentialsDirectory = dir // Ensure the directory has 600 permissions - require.NoError(t, os.Chmod(dir, 0600)) + require.NoError(t, os.Chmod(dir, 0o600)) se, err := newSumologicExtension(cfg, zap.NewNop(), component.NewID(metadata.Type), "1.0.0") require.NoError(t, err) @@ -261,7 +260,7 @@ func TestStoreCredentials(t *testing.T) { cfg.CollectorCredentialsDirectory = dir // Ensure the directory has 700 permissions - require.NoError(t, os.Chmod(dir, 0700)) + require.NoError(t, os.Chmod(dir, 0o700)) se, err := newSumologicExtension(cfg, zap.NewNop(), component.NewID(metadata.Type), "1.0.0") require.NoError(t, err) diff --git a/extension/sumologicextension/go.mod b/extension/sumologicextension/go.mod index bc9ce9e882cd..8ba386cedd22 100644 --- a/extension/sumologicextension/go.mod +++ b/extension/sumologicextension/go.mod @@ -5,9 +5,8 @@ go 1.22.0 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/v4 v4.24.10 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 diff --git a/extension/sumologicextension/go.sum b/extension/sumologicextension/go.sum index f6aa46f26d9e..835881b5e57f 100644 --- a/extension/sumologicextension/go.sum +++ b/extension/sumologicextension/go.sum @@ -40,8 +40,6 @@ 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/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= -github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= 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= @@ -58,8 +56,8 @@ github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/shirou/gopsutil/v4 v4.24.10 h1:7VOzPtfw/5YDU+jLEoBwXwxJbQetULywoSV4RYY7HkM= github.com/shirou/gopsutil/v4 v4.24.10/go.mod h1:s4D/wg+ag4rG0WO7AiTj2BeYCRhym0vM7DHbZRxnIT8= -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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/internal/aws/awsutil/go.mod b/internal/aws/awsutil/go.mod index 66dac006739b..96ab9413055d 100644 --- a/internal/aws/awsutil/go.mod +++ b/internal/aws/awsutil/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/aws/aws-sdk-go v1.55.5 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 golang.org/x/net v0.30.0 diff --git a/internal/aws/awsutil/go.sum b/internal/aws/awsutil/go.sum index 9afe87634df3..c24caeb8f0b3 100644 --- a/internal/aws/awsutil/go.sum +++ b/internal/aws/awsutil/go.sum @@ -18,8 +18,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/internal/aws/containerinsight/go.mod b/internal/aws/containerinsight/go.mod index 9d6e1f4a7bb9..bc30cf25ab0d 100644 --- a/internal/aws/containerinsight/go.mod +++ b/internal/aws/containerinsight/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/co go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/pdata v1.20.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 diff --git a/internal/aws/containerinsight/go.sum b/internal/aws/containerinsight/go.sum index 9d867f7c8616..fc2b299c43ca 100644 --- a/internal/aws/containerinsight/go.sum +++ b/internal/aws/containerinsight/go.sum @@ -25,8 +25,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.20.0 h1:ePcwt4bdtISP0loHaE+C9xYoU2ZkIvWv89Fob16o9SM= diff --git a/internal/aws/cwlogs/go.mod b/internal/aws/cwlogs/go.mod index 1b53477df393..efa59f04e570 100644 --- a/internal/aws/cwlogs/go.mod +++ b/internal/aws/cwlogs/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/aws/aws-sdk-go v1.55.5 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 diff --git a/internal/aws/cwlogs/go.sum b/internal/aws/cwlogs/go.sum index 871cf04724d8..d9dfa1be2a56 100644 --- a/internal/aws/cwlogs/go.sum +++ b/internal/aws/cwlogs/go.sum @@ -28,8 +28,8 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/internal/aws/ecsutil/go.mod b/internal/aws/ecsutil/go.mod index 36e646bfb885..336c0530c599 100644 --- a/internal/aws/ecsutil/go.mod +++ b/internal/aws/ecsutil/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 diff --git a/internal/aws/ecsutil/go.sum b/internal/aws/ecsutil/go.sum index 055df7c21fc3..e7015497c0f7 100644 --- a/internal/aws/ecsutil/go.sum +++ b/internal/aws/ecsutil/go.sum @@ -39,8 +39,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/internal/aws/k8s/go.mod b/internal/aws/k8s/go.mod index fcf2362edc42..1b75351a79f3 100644 --- a/internal/aws/k8s/go.mod +++ b/internal/aws/k8s/go.mod @@ -4,12 +4,12 @@ go 1.22.0 require ( github.com/aws/aws-sdk-go v1.55.5 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - k8s.io/api v0.31.2 - k8s.io/apimachinery v0.31.2 - k8s.io/client-go v0.31.2 + k8s.io/api v0.31.3 + k8s.io/apimachinery v0.31.3 + k8s.io/client-go v0.31.3 ) require ( diff --git a/internal/aws/k8s/go.sum b/internal/aws/k8s/go.sum index 61761e2005bd..c01fd806a31a 100644 --- a/internal/aws/k8s/go.sum +++ b/internal/aws/k8s/go.sum @@ -84,8 +84,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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -150,12 +150,12 @@ 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.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= -k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= -k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= -k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= -k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= diff --git a/internal/aws/metrics/go.mod b/internal/aws/metrics/go.mod index 7f89d083cbdd..e42da870540b 100644 --- a/internal/aws/metrics/go.mod +++ b/internal/aws/metrics/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/me go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/otel v1.32.0 go.uber.org/goleak v1.3.0 ) diff --git a/internal/aws/metrics/go.sum b/internal/aws/metrics/go.sum index acd8fd05446c..335b9a039af8 100644 --- a/internal/aws/metrics/go.sum +++ b/internal/aws/metrics/go.sum @@ -11,8 +11,8 @@ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= diff --git a/internal/aws/proxy/go.mod b/internal/aws/proxy/go.mod index 69a8b0ae8526..ce04fb2d1e7c 100644 --- a/internal/aws/proxy/go.mod +++ b/internal/aws/proxy/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/aws/aws-sdk-go v1.55.5 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/config/confignet v1.20.0 go.opentelemetry.io/collector/config/configtls v1.20.0 go.uber.org/zap v1.27.0 diff --git a/internal/aws/proxy/go.sum b/internal/aws/proxy/go.sum index fbea341e3155..2df3d651661e 100644 --- a/internal/aws/proxy/go.sum +++ b/internal/aws/proxy/go.sum @@ -20,8 +20,8 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= go.opentelemetry.io/collector/config/confignet v1.20.0 h1:LrM6AuiY8N/woTP4SWhL2V0562JXwJs9MRNFZJFLtRY= go.opentelemetry.io/collector/config/confignet v1.20.0/go.mod h1:o3v4joAEjvLwntqexg5ixMqRrU1+Vst+jWuCUaBNgOg= go.opentelemetry.io/collector/config/configopaque v1.20.0 h1:2I48zKiyyyYqjm7y0B9OLp24ku2ZSX3nCHG0r5FdWOQ= diff --git a/internal/aws/xray/go.mod b/internal/aws/xray/go.mod index c8452390ea00..be6937c719ba 100644 --- a/internal/aws/xray/go.mod +++ b/internal/aws/xray/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/aws/aws-sdk-go v1.55.5 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 diff --git a/internal/aws/xray/go.sum b/internal/aws/xray/go.sum index d19fefa56e66..c0bc1e45e276 100644 --- a/internal/aws/xray/go.sum +++ b/internal/aws/xray/go.sum @@ -28,8 +28,8 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/internal/common/go.mod b/internal/common/go.mod index e5c36d65f8c1..3223c6002a0d 100644 --- a/internal/common/go.mod +++ b/internal/common/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/common go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/featuregate v1.20.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 diff --git a/internal/common/go.sum b/internal/common/go.sum index 520e184d5cb1..2db88d13821d 100644 --- a/internal/common/go.sum +++ b/internal/common/go.sum @@ -10,8 +10,8 @@ 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/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= go.opentelemetry.io/collector/featuregate v1.20.0 h1:Mi7nMy/q52eruI+6jWnMKUOeM55XvwoPnGcdB1++O8c= go.opentelemetry.io/collector/featuregate v1.20.0/go.mod h1:47xrISO71vJ83LSMm8+yIDsUbKktUp48Ovt7RR6VbRs= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= diff --git a/internal/coreinternal/errorutil/http.go b/internal/coreinternal/errorutil/http.go index 0a78f602f7ed..930f0fd51fcd 100644 --- a/internal/coreinternal/errorutil/http.go +++ b/internal/coreinternal/errorutil/http.go @@ -13,11 +13,21 @@ func HTTPError(w http.ResponseWriter, err error) { if err == nil { return } + http.Error(w, err.Error(), GetHTTPStatusCodeFromError(err)) +} + +func GetHTTPStatusCodeFromError(err error) int { + // See requirements for receviers + // https://github.com/open-telemetry/opentelemetry-collector/blob/8e522ad950de6326a0841d7e1bef808bbc0d3537/receiver/doc.go#L10-L29 + + // See https://github.com/open-telemetry/opentelemetry-proto/blob/main/docs/specification.md#failures-1 + // to see a list of retryable http status codes. + // non-retryable status status := http.StatusBadRequest if !consumererror.IsPermanent(err) { // retryable status status = http.StatusServiceUnavailable } - http.Error(w, err.Error(), status) + return status } diff --git a/internal/coreinternal/go.mod b/internal/coreinternal/go.mod index 9c1d6a0c9d7d..e3993f729aba 100644 --- a/internal/coreinternal/go.mod +++ b/internal/coreinternal/go.mod @@ -8,7 +8,7 @@ require ( github.com/elastic/lunes v0.1.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.34.0 go.opentelemetry.io/collector/client v1.20.0 go.opentelemetry.io/collector/component v0.114.0 diff --git a/internal/coreinternal/go.sum b/internal/coreinternal/go.sum index 14b7c0591506..3744a8286706 100644 --- a/internal/coreinternal/go.sum +++ b/internal/coreinternal/go.sum @@ -110,8 +110,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/internal/docker/go.mod b/internal/docker/go.mod index 8f8675436399..ad1e820c87c7 100644 --- a/internal/docker/go.mod +++ b/internal/docker/go.mod @@ -6,7 +6,7 @@ require ( github.com/Microsoft/go-winio v0.6.2 github.com/docker/docker v27.3.1+incompatible github.com/gobwas/glob v0.2.3 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/confmap v1.20.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 diff --git a/internal/docker/go.sum b/internal/docker/go.sum index 3356d8a27a30..05a7881297b8 100644 --- a/internal/docker/go.sum +++ b/internal/docker/go.sum @@ -74,8 +74,8 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/confmap v1.20.0 h1:ARfOwmkKxFOud1njl03yAHQ30+uenlzqCO6LBYamDTE= diff --git a/internal/exp/metrics/go.mod b/internal/exp/metrics/go.mod index cd260923a171..48ae506853bc 100644 --- a/internal/exp/metrics/go.mod +++ b/internal/exp/metrics/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/pdata v1.20.0 go.opentelemetry.io/collector/semconv v0.114.0 ) diff --git a/internal/exp/metrics/go.sum b/internal/exp/metrics/go.sum index d6082b37d018..d44609c2679b 100644 --- a/internal/exp/metrics/go.sum +++ b/internal/exp/metrics/go.sum @@ -27,8 +27,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.20.0 h1:ePcwt4bdtISP0loHaE+C9xYoU2ZkIvWv89Fob16o9SM= diff --git a/internal/filter/go.mod b/internal/filter/go.mod index 76aa05b243ea..62c137dd5dc1 100644 --- a/internal/filter/go.mod +++ b/internal/filter/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/internal/filter/go.sum b/internal/filter/go.sum index 61cdbe4f8cf7..90bcabcafdc0 100644 --- a/internal/filter/go.sum +++ b/internal/filter/go.sum @@ -80,8 +80,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 h1:SIKIoA4e/5Y9ZOl0DCe3eVMLPOQzJxgZpfdHHeauNTM= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6/go.mod h1:BUbeWZiieNxAuuADTBNb3/aeje6on3DhU3rpWsQSB1E= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/internal/grpcutil/go.mod b/internal/grpcutil/go.mod index e5b7447a2928..67801c1df217 100644 --- a/internal/grpcutil/go.mod +++ b/internal/grpcutil/go.mod @@ -2,7 +2,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/grpcut go 1.22.0 -require github.com/stretchr/testify v1.9.0 +require github.com/stretchr/testify v1.10.0 require ( github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/internal/grpcutil/go.sum b/internal/grpcutil/go.sum index 60ce688a0410..713a0b4f0a3a 100644 --- a/internal/grpcutil/go.sum +++ b/internal/grpcutil/go.sum @@ -2,8 +2,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/internal/k8sconfig/go.mod b/internal/k8sconfig/go.mod index 02492ff07f33..f12abc5f8462 100644 --- a/internal/k8sconfig/go.mod +++ b/internal/k8sconfig/go.mod @@ -4,9 +4,9 @@ go 1.22.0 require ( github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 - k8s.io/api v0.31.2 - k8s.io/apimachinery v0.31.2 - k8s.io/client-go v0.31.2 + k8s.io/api v0.31.3 + k8s.io/apimachinery v0.31.3 + k8s.io/client-go v0.31.3 ) require ( diff --git a/internal/k8sconfig/go.sum b/internal/k8sconfig/go.sum index 7a02e4808556..2bd99a0e12b9 100644 --- a/internal/k8sconfig/go.sum +++ b/internal/k8sconfig/go.sum @@ -483,14 +483,14 @@ 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.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= -k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= -k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= -k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= 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= diff --git a/internal/k8stest/go.mod b/internal/k8stest/go.mod index 5bdc6e9420d9..22b721556241 100644 --- a/internal/k8stest/go.mod +++ b/internal/k8stest/go.mod @@ -4,10 +4,10 @@ go 1.22.0 require ( github.com/docker/docker v27.3.1+incompatible - github.com/stretchr/testify v1.9.0 - k8s.io/api v0.31.2 - k8s.io/apimachinery v0.31.2 - k8s.io/client-go v0.31.2 + github.com/stretchr/testify v1.10.0 + k8s.io/api v0.31.3 + k8s.io/apimachinery v0.31.3 + k8s.io/client-go v0.31.3 ) require ( diff --git a/internal/k8stest/go.sum b/internal/k8stest/go.sum index fb123c90c0c6..21fff07d172f 100644 --- a/internal/k8stest/go.sum +++ b/internal/k8stest/go.sum @@ -114,8 +114,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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -204,12 +204,12 @@ 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.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= -k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= -k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= -k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= -k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= diff --git a/internal/kafka/go.mod b/internal/kafka/go.mod index 9a455f47d82b..6eb2db87fef9 100644 --- a/internal/kafka/go.mod +++ b/internal/kafka/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/IBM/sarama v1.43.3 github.com/aws/aws-sdk-go v1.55.5 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/xdg-go/scram v1.1.2 go.opentelemetry.io/collector/config/configtls v1.20.0 go.uber.org/goleak v1.3.0 diff --git a/internal/kafka/go.sum b/internal/kafka/go.sum index bb6133795807..8d9c8ef62965 100644 --- a/internal/kafka/go.sum +++ b/internal/kafka/go.sum @@ -66,8 +66,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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/internal/kubelet/go.mod b/internal/kubelet/go.mod index 5be66b1a622c..da9d3dae8913 100644 --- a/internal/kubelet/go.mod +++ b/internal/kubelet/go.mod @@ -5,11 +5,11 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/config/configtls v1.20.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - k8s.io/client-go v0.31.2 + k8s.io/client-go v0.31.3 ) require ( @@ -51,8 +51,8 @@ require ( 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.31.2 // indirect - k8s.io/apimachinery v0.31.2 // indirect + k8s.io/api v0.31.3 // indirect + k8s.io/apimachinery v0.31.3 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect diff --git a/internal/kubelet/go.sum b/internal/kubelet/go.sum index c4f0abf8f1a4..eccec36e25d1 100644 --- a/internal/kubelet/go.sum +++ b/internal/kubelet/go.sum @@ -229,8 +229,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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -495,14 +495,14 @@ 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.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= -k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= -k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= -k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= 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= diff --git a/internal/metadataproviders/go.mod b/internal/metadataproviders/go.mod index 9fd66a164d20..0627ad5a6464 100644 --- a/internal/metadataproviders/go.mod +++ b/internal/metadataproviders/go.mod @@ -9,14 +9,14 @@ require ( github.com/hashicorp/consul/api v1.30.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.114.0 github.com/shirou/gopsutil/v4 v4.24.10 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/semconv v0.114.0 go.opentelemetry.io/otel v1.32.0 go.opentelemetry.io/otel/sdk v1.32.0 go.uber.org/goleak v1.3.0 - k8s.io/api v0.31.2 - k8s.io/apimachinery v0.31.2 - k8s.io/client-go v0.31.2 + k8s.io/api v0.31.3 + k8s.io/apimachinery v0.31.3 + k8s.io/client-go v0.31.3 ) require ( diff --git a/internal/metadataproviders/go.sum b/internal/metadataproviders/go.sum index 618466d04459..3013d99b4135 100644 --- a/internal/metadataproviders/go.sum +++ b/internal/metadataproviders/go.sum @@ -418,8 +418,8 @@ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= @@ -748,14 +748,14 @@ 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.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= -k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= -k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= -k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= 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= diff --git a/internal/otelarrow/go.mod b/internal/otelarrow/go.mod index 62d8da9cd7ee..a83b961a38b1 100644 --- a/internal/otelarrow/go.mod +++ b/internal/otelarrow/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/exporter/otelarrowexporter v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otelarrowreceiver v0.114.0 github.com/open-telemetry/otel-arrow v0.31.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configgrpc v0.114.0 diff --git a/internal/otelarrow/go.sum b/internal/otelarrow/go.sum index cff9f6b80003..13edfb51613f 100644 --- a/internal/otelarrow/go.sum +++ b/internal/otelarrow/go.sum @@ -91,8 +91,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/internal/pdatautil/go.mod b/internal/pdatautil/go.mod index 9f7901d2514d..737721bbbef2 100644 --- a/internal/pdatautil/go.mod +++ b/internal/pdatautil/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/pdata v1.20.0 ) diff --git a/internal/pdatautil/go.sum b/internal/pdatautil/go.sum index 45c16dca160d..7e193df29d6a 100644 --- a/internal/pdatautil/go.sum +++ b/internal/pdatautil/go.sum @@ -27,8 +27,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.20.0 h1:ePcwt4bdtISP0loHaE+C9xYoU2ZkIvWv89Fob16o9SM= diff --git a/internal/rabbitmq/go.mod b/internal/rabbitmq/go.mod index d748d9677cd1..1536aa8fab5e 100644 --- a/internal/rabbitmq/go.mod +++ b/internal/rabbitmq/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/rabbitmq/amqp091-go v1.10.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.uber.org/zap v1.27.0 ) diff --git a/internal/rabbitmq/go.sum b/internal/rabbitmq/go.sum index 545be36de8ce..b01797957a44 100644 --- a/internal/rabbitmq/go.sum +++ b/internal/rabbitmq/go.sum @@ -6,8 +6,8 @@ github.com/rabbitmq/amqp091-go v1.10.0 h1:STpn5XsHlHGcecLmMFCtg7mqq0RnD+zFr4uzuk github.com/rabbitmq/amqp091-go v1.10.0/go.mod h1:Hy4jKW5kQART1u+JkDTF9YYOQUHXqMuhrgxOEeS7G4o= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= diff --git a/internal/sharedcomponent/go.mod b/internal/sharedcomponent/go.mod index 171897482281..5a643038fa0b 100644 --- a/internal/sharedcomponent/go.mod +++ b/internal/sharedcomponent/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/shared go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.uber.org/goleak v1.3.0 diff --git a/internal/sharedcomponent/go.sum b/internal/sharedcomponent/go.sum index b58fa13379df..5cf41071e9cb 100644 --- a/internal/sharedcomponent/go.sum +++ b/internal/sharedcomponent/go.sum @@ -21,8 +21,8 @@ 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/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/internal/splunk/go.mod b/internal/splunk/go.mod index 53557016e9df..f6178fc1bc7a 100644 --- a/internal/splunk/go.mod +++ b/internal/splunk/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/consumer/consumererror v0.114.0 go.opentelemetry.io/collector/exporter v0.114.0 go.opentelemetry.io/collector/pdata v1.20.0 diff --git a/internal/splunk/go.sum b/internal/splunk/go.sum index c9e788cc3cb6..c7982335ed75 100644 --- a/internal/splunk/go.sum +++ b/internal/splunk/go.sum @@ -34,8 +34,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/internal/sqlquery/go.mod b/internal/sqlquery/go.mod index 0d2e1c417b2e..e6993fcccd58 100644 --- a/internal/sqlquery/go.mod +++ b/internal/sqlquery/go.mod @@ -9,7 +9,7 @@ require ( github.com/microsoft/go-mssqldb v1.7.2 github.com/sijms/go-ora/v2 v2.8.22 github.com/snowflakedb/gosnowflake v1.12.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/pdata v1.20.0 diff --git a/internal/sqlquery/go.sum b/internal/sqlquery/go.sum index 73caf54d2d4e..63d4e81a97d4 100644 --- a/internal/sqlquery/go.sum +++ b/internal/sqlquery/go.sum @@ -179,8 +179,8 @@ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/internal/tools/go.mod b/internal/tools/go.mod index 6b1b65130856..f013f582f68c 100644 --- a/internal/tools/go.mod +++ b/internal/tools/go.mod @@ -22,6 +22,7 @@ require ( golang.org/x/tools v0.26.0 golang.org/x/vuln v1.1.3 gotest.tools/gotestsum v1.12.0 + mvdan.cc/gofumpt v0.6.0 ) require ( @@ -257,7 +258,6 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect honnef.co/go/tools v0.4.7 // indirect - mvdan.cc/gofumpt v0.6.0 // indirect mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f // indirect ) diff --git a/internal/tools/tools.go b/internal/tools/tools.go index c23aaba4ba27..2dcc07248445 100644 --- a/internal/tools/tools.go +++ b/internal/tools/tools.go @@ -29,4 +29,5 @@ import ( _ "golang.org/x/tools/cmd/goimports" _ "golang.org/x/vuln/cmd/govulncheck" _ "gotest.tools/gotestsum" + _ "mvdan.cc/gofumpt" ) diff --git a/pkg/batchperresourceattr/go.mod b/pkg/batchperresourceattr/go.mod index dffc7ca835c4..c036b276d3d3 100644 --- a/pkg/batchperresourceattr/go.mod +++ b/pkg/batchperresourceattr/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperres go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/consumer v0.114.0 go.opentelemetry.io/collector/consumer/consumertest v0.114.0 go.opentelemetry.io/collector/pdata v1.20.0 diff --git a/pkg/batchperresourceattr/go.sum b/pkg/batchperresourceattr/go.sum index 78868a157dc3..25fffcd3f382 100644 --- a/pkg/batchperresourceattr/go.sum +++ b/pkg/batchperresourceattr/go.sum @@ -25,8 +25,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/consumer v0.114.0 h1:1zVaHvfIZowGwZRitRBRo3i+RP2StlU+GClYiofSw0Q= diff --git a/pkg/batchpersignal/go.mod b/pkg/batchpersignal/go.mod index 928c23c177b1..39e843799d4a 100644 --- a/pkg/batchpersignal/go.mod +++ b/pkg/batchpersignal/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersig go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/pdata v1.20.0 go.uber.org/goleak v1.3.0 ) diff --git a/pkg/batchpersignal/go.sum b/pkg/batchpersignal/go.sum index a8b905e6175b..67857eb6fb63 100644 --- a/pkg/batchpersignal/go.sum +++ b/pkg/batchpersignal/go.sum @@ -26,8 +26,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.20.0 h1:ePcwt4bdtISP0loHaE+C9xYoU2ZkIvWv89Fob16o9SM= diff --git a/pkg/datadog/config/metrics.go b/pkg/datadog/config/metrics.go index fc2c307a1be3..c17a148af8e4 100644 --- a/pkg/datadog/config/metrics.go +++ b/pkg/datadog/config/metrics.go @@ -7,12 +7,8 @@ import ( "encoding" "fmt" - "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/config/confignet" - "go.opentelemetry.io/collector/featuregate" ) // MetricsConfig defines the metrics exporter specific configuration options @@ -212,29 +208,10 @@ type MetricsExporterConfig struct { InstrumentationScopeMetadataAsTags bool `mapstructure:"instrumentation_scope_metadata_as_tags"` } -var metricRemappingDisableddFeatureGate = featuregate.GlobalRegistry().MustRegister( - "exporter.datadogexporter.metricremappingdisabled", - featuregate.StageAlpha, - featuregate.WithRegisterDescription("When enabled the Datadog Exporter remaps OpenTelemetry semantic conventions to Datadog semantic conventions. This feature gate is only for internal use."), - featuregate.WithRegisterReferenceURL("https://docs.datadoghq.com/opentelemetry/schema_semantics/metrics_mapping/"), -) - -// isMetricRemappingDisabled returns true if the datadogexporter should generate Datadog-compliant metrics from OpenTelemetry metrics -func isMetricRemappingDisabled() bool { - return metricRemappingDisableddFeatureGate.IsEnabled() -} - -// TranslatorFromConfig creates a new metrics translator from the exporter -func TranslatorFromConfig(set component.TelemetrySettings, mcfg MetricsConfig, attrsTranslator *attributes.Translator, sourceProvider source.Provider, statsOut chan []byte) (*otlpmetrics.Translator, error) { +// ToTranslatorOpts returns a list of metrics translator options from the metrics config +func (mcfg MetricsConfig) ToTranslatorOpts() []otlpmetrics.TranslatorOption { options := []otlpmetrics.TranslatorOption{ otlpmetrics.WithDeltaTTL(mcfg.DeltaTTL), - otlpmetrics.WithFallbackSourceProvider(sourceProvider), - } - - if isMetricRemappingDisabled() { - set.Logger.Warn("Metric remapping is disabled in the Datadog exporter. OpenTelemetry metrics must be mapped to Datadog semantics before metrics are exported to Datadog (ex: via a processor).") - } else { - options = append(options, otlpmetrics.WithRemapping()) } if mcfg.HistConfig.SendAggregations { @@ -262,6 +239,5 @@ func TranslatorFromConfig(set component.TelemetrySettings, mcfg MetricsConfig, a options = append(options, otlpmetrics.WithInitialCumulMonoValueMode( otlpmetrics.InitialCumulMonoValueMode(mcfg.SumConfig.InitialCumulativeMonotonicMode))) - options = append(options, otlpmetrics.WithStatsOut(statsOut)) - return otlpmetrics.NewTranslator(set, attrsTranslator, options...) + return options } diff --git a/pkg/datadog/go.mod b/pkg/datadog/go.mod index 49a3971b006c..615c50aa1c3c 100644 --- a/pkg/datadog/go.mod +++ b/pkg/datadog/go.mod @@ -4,9 +4,8 @@ go 1.22.0 require ( github.com/DataDog/datadog-agent/pkg/util/hostname/validate v0.59.0 - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.21.0 github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.21.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configauth v0.114.0 @@ -17,7 +16,6 @@ require ( go.opentelemetry.io/collector/config/configtls v1.20.0 go.opentelemetry.io/collector/confmap v1.20.0 go.opentelemetry.io/collector/exporter v0.114.0 - go.opentelemetry.io/collector/featuregate v1.20.0 go.uber.org/zap v1.27.0 ) @@ -25,6 +23,7 @@ require ( github.com/DataDog/datadog-agent/pkg/proto v0.52.0-devel // indirect github.com/DataDog/datadog-agent/pkg/util/log v0.59.0 // indirect github.com/DataDog/datadog-agent/pkg/util/scrubber v0.59.0 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.21.0 // indirect github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.21.0 // indirect github.com/DataDog/sketches-go v1.4.4 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect @@ -40,7 +39,6 @@ require ( 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.7.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.17.11 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect diff --git a/pkg/datadog/go.sum b/pkg/datadog/go.sum index 1b0b76693743..028d8c43ac7d 100644 --- a/pkg/datadog/go.sum +++ b/pkg/datadog/go.sum @@ -53,8 +53,6 @@ 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.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.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY= -github.com/hashicorp/go-version v1.7.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= @@ -101,8 +99,8 @@ github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU 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.6.1/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tinylib/msgp v1.1.8 h1:FCXC1xanKO4I8plpHGH2P7koL/RzZs12l/+r7vakfm0= github.com/tinylib/msgp v1.1.8/go.mod h1:qkpG+2ldGg4xRFmx+jfTvZPxfGFhi64BcnL9vkCm/Tw= github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= @@ -160,8 +158,6 @@ go.opentelemetry.io/collector/extension/experimental/storage v0.114.0 h1:hLyX9Uv go.opentelemetry.io/collector/extension/experimental/storage v0.114.0/go.mod h1:WqYRQVJjJLE1rm+y/ks1wPdPRGWePEvE1VO07xm2J2k= go.opentelemetry.io/collector/extension/extensiontest v0.114.0 h1:ibXDms1qrswlvlR6b3d2BeyI8sXUXoFV11yOi9Sop8o= go.opentelemetry.io/collector/extension/extensiontest v0.114.0/go.mod h1:/bOYmqu5yTDfI1bJZUxFqm8ZtmcodpquebiSxiQxtDY= -go.opentelemetry.io/collector/featuregate v1.20.0 h1:Mi7nMy/q52eruI+6jWnMKUOeM55XvwoPnGcdB1++O8c= -go.opentelemetry.io/collector/featuregate v1.20.0/go.mod h1:47xrISO71vJ83LSMm8+yIDsUbKktUp48Ovt7RR6VbRs= go.opentelemetry.io/collector/pdata v1.20.0 h1:ePcwt4bdtISP0loHaE+C9xYoU2ZkIvWv89Fob16o9SM= go.opentelemetry.io/collector/pdata v1.20.0/go.mod h1:Ox1YVLe87cZDB/TL30i4SUz1cA5s6AM6SpFMfY61ICs= go.opentelemetry.io/collector/pdata/pprofile v0.114.0 h1:pUNfTzsI/JUTiE+DScDM4lsrPoxnVNLI2fbTxR/oapo= diff --git a/pkg/datadog/metadata.yaml b/pkg/datadog/metadata.yaml index dae3d0ab2af6..2b6a2b6d571c 100644 --- a/pkg/datadog/metadata.yaml +++ b/pkg/datadog/metadata.yaml @@ -1,3 +1,3 @@ status: codeowners: - active: [mx-psi,dineshg13, liustanley, songy23, mackjmr, ankitpatel96] \ No newline at end of file + active: [mx-psi, dineshg13, liustanley, songy23, mackjmr, ankitpatel96, jade-guiton-dd] \ No newline at end of file diff --git a/pkg/experimentalmetricmetadata/go.mod b/pkg/experimentalmetricmetadata/go.mod index 2cbe87b1e799..e4f83c9897d3 100644 --- a/pkg/experimentalmetricmetadata/go.mod +++ b/pkg/experimentalmetricmetadata/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimenta go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/pdata v1.20.0 go.uber.org/goleak v1.3.0 ) diff --git a/pkg/experimentalmetricmetadata/go.sum b/pkg/experimentalmetricmetadata/go.sum index a8b905e6175b..67857eb6fb63 100644 --- a/pkg/experimentalmetricmetadata/go.sum +++ b/pkg/experimentalmetricmetadata/go.sum @@ -26,8 +26,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.20.0 h1:ePcwt4bdtISP0loHaE+C9xYoU2ZkIvWv89Fob16o9SM= diff --git a/pkg/golden/go.mod b/pkg/golden/go.mod index eea46a2dd5ce..2caef6c7c8e5 100644 --- a/pkg/golden/go.mod +++ b/pkg/golden/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/pdata v1.20.0 go.uber.org/goleak v1.3.0 gopkg.in/yaml.v3 v3.0.1 diff --git a/pkg/golden/go.sum b/pkg/golden/go.sum index 45c16dca160d..7e193df29d6a 100644 --- a/pkg/golden/go.sum +++ b/pkg/golden/go.sum @@ -27,8 +27,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.20.0 h1:ePcwt4bdtISP0loHaE+C9xYoU2ZkIvWv89Fob16o9SM= diff --git a/pkg/ottl/go.mod b/pkg/ottl/go.mod index c334c509ee55..f0446df70d54 100644 --- a/pkg/ottl/go.mod +++ b/pkg/ottl/go.mod @@ -13,7 +13,7 @@ require ( github.com/iancoleman/strcase v0.3.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/pkg/ottl/go.sum b/pkg/ottl/go.sum index 044b77cc5985..e7a4f168c994 100644 --- a/pkg/ottl/go.sum +++ b/pkg/ottl/go.sum @@ -62,8 +62,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 h1:SIKIoA4e/5Y9ZOl0DCe3eVMLPOQzJxgZpfdHHeauNTM= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6/go.mod h1:BUbeWZiieNxAuuADTBNb3/aeje6on3DhU3rpWsQSB1E= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/pkg/ottl/parser.go b/pkg/ottl/parser.go index 4856279181d1..fade87d2982d 100644 --- a/pkg/ottl/parser.go +++ b/pkg/ottl/parser.go @@ -18,9 +18,10 @@ import ( // 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 { - function Expr[K] - condition BoolExpr[K] - origText string + function Expr[K] + condition BoolExpr[K] + origText string + telemetrySettings component.TelemetrySettings } // Execute is a function that will execute the statement's function if the statement's condition is met. @@ -29,6 +30,11 @@ type Statement[K any] struct { // In addition, the functions return value is always returned. func (s *Statement[K]) Execute(ctx context.Context, tCtx K) (any, bool, error) { condition, err := s.condition.Eval(ctx, tCtx) + defer func() { + if s.telemetrySettings.Logger != nil { + s.telemetrySettings.Logger.Debug("TransformContext after statement execution", zap.String("statement", s.origText), zap.Bool("condition matched", condition), zap.Any("TransformContext", tCtx)) + } + }() if err != nil { return nil, false, err } @@ -150,9 +156,10 @@ func (p *Parser[K]) ParseStatement(statement string) (*Statement[K], error) { return nil, err } return &Statement[K]{ - function: function, - condition: expression, - origText: statement, + function: function, + condition: expression, + origText: statement, + telemetrySettings: p.telemetrySettings, }, nil } @@ -332,10 +339,9 @@ func NewStatementSequence[K any](statements []*Statement[K], telemetrySettings c // 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 { - s.telemetrySettings.Logger.Debug("initial TransformContext", zap.Any("TransformContext", tCtx)) + s.telemetrySettings.Logger.Debug("initial TransformContext before executing StatementSequence", zap.Any("TransformContext", tCtx)) for _, statement := range s.statements { - _, condition, err := statement.Execute(ctx, tCtx) - s.telemetrySettings.Logger.Debug("TransformContext after statement execution", zap.String("statement", statement.origText), zap.Bool("condition matched", condition), zap.Any("TransformContext", tCtx)) + _, _, err := statement.Execute(ctx, tCtx) if err != nil { if s.errorMode == PropagateError { err = fmt.Errorf("failed to execute statement: %v, %w", statement.origText, err) diff --git a/pkg/ottl/parser_test.go b/pkg/ottl/parser_test.go index 9e2e09a10e5f..726f531bfb81 100644 --- a/pkg/ottl/parser_test.go +++ b/pkg/ottl/parser_test.go @@ -2382,8 +2382,9 @@ func Test_Statement_Execute(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { statement := Statement[any]{ - condition: BoolExpr[any]{tt.condition}, - function: Expr[any]{exprFunc: tt.function}, + condition: BoolExpr[any]{tt.condition}, + function: Expr[any]{exprFunc: tt.function}, + telemetrySettings: componenttest.NewNopTelemetrySettings(), } result, condition, err := statement.Execute(context.Background(), nil) @@ -2497,8 +2498,9 @@ func Test_Statements_Execute_Error(t *testing.T) { statements := StatementSequence[any]{ statements: []*Statement[any]{ { - condition: BoolExpr[any]{tt.condition}, - function: Expr[any]{exprFunc: tt.function}, + condition: BoolExpr[any]{tt.condition}, + function: Expr[any]{exprFunc: tt.function}, + telemetrySettings: componenttest.NewNopTelemetrySettings(), }, }, errorMode: tt.errorMode, diff --git a/pkg/pdatatest/go.mod b/pkg/pdatatest/go.mod index 9389733e5746..1c6ff9028fa7 100644 --- a/pkg/pdatatest/go.mod +++ b/pkg/pdatatest/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/pdata v1.20.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 diff --git a/pkg/pdatatest/go.sum b/pkg/pdatatest/go.sum index 45c16dca160d..7e193df29d6a 100644 --- a/pkg/pdatatest/go.sum +++ b/pkg/pdatatest/go.sum @@ -27,8 +27,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.20.0 h1:ePcwt4bdtISP0loHaE+C9xYoU2ZkIvWv89Fob16o9SM= diff --git a/pkg/pdatautil/go.mod b/pkg/pdatautil/go.mod index 88ef00b6ba98..7ebf9c7fc7da 100644 --- a/pkg/pdatautil/go.mod +++ b/pkg/pdatautil/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/cespare/xxhash/v2 v2.3.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/pdata v1.20.0 go.uber.org/goleak v1.3.0 ) diff --git a/pkg/pdatautil/go.sum b/pkg/pdatautil/go.sum index 2d538e0fd84a..c0161d7c1ea1 100644 --- a/pkg/pdatautil/go.sum +++ b/pkg/pdatautil/go.sum @@ -17,8 +17,8 @@ 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/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.20.0 h1:ePcwt4bdtISP0loHaE+C9xYoU2ZkIvWv89Fob16o9SM= diff --git a/pkg/resourcetotelemetry/go.mod b/pkg/resourcetotelemetry/go.mod index 3a989ebed870..be5830856d86 100644 --- a/pkg/resourcetotelemetry/go.mod +++ b/pkg/resourcetotelemetry/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/consumer v0.114.0 go.opentelemetry.io/collector/exporter v0.114.0 go.opentelemetry.io/collector/pdata v1.20.0 diff --git a/pkg/resourcetotelemetry/go.sum b/pkg/resourcetotelemetry/go.sum index a30275e633f9..dbe1ed2e26d2 100644 --- a/pkg/resourcetotelemetry/go.sum +++ b/pkg/resourcetotelemetry/go.sum @@ -29,8 +29,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/pkg/sampling/go.mod b/pkg/sampling/go.mod index 58f1fa24a2c4..fb70db1f9dfd 100644 --- a/pkg/sampling/go.mod +++ b/pkg/sampling/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/pdata v1.20.0 go.uber.org/multierr v1.11.0 ) diff --git a/pkg/sampling/go.sum b/pkg/sampling/go.sum index 7d4020a9936d..d301979057a3 100644 --- a/pkg/sampling/go.sum +++ b/pkg/sampling/go.sum @@ -15,8 +15,8 @@ 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/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.20.0 h1:ePcwt4bdtISP0loHaE+C9xYoU2ZkIvWv89Fob16o9SM= diff --git a/pkg/stanza/go.mod b/pkg/stanza/go.mod index 60747a8cdeaf..0b5599660114 100644 --- a/pkg/stanza/go.mod +++ b/pkg/stanza/go.mod @@ -15,7 +15,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/valyala/fastjson v1.6.4 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/pkg/stanza/go.sum b/pkg/stanza/go.sum index 4e8504c53eaa..f5f46012cc14 100644 --- a/pkg/stanza/go.sum +++ b/pkg/stanza/go.sum @@ -73,8 +73,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/pkg/status/go.mod b/pkg/status/go.mod index e99f8705e51c..cfaf6cd0c540 100644 --- a/pkg/status/go.mod +++ b/pkg/status/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/status go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/pipeline v0.114.0 diff --git a/pkg/status/go.sum b/pkg/status/go.sum index 1428d5d2f4b7..7c8d27dcafa4 100644 --- a/pkg/status/go.sum +++ b/pkg/status/go.sum @@ -18,8 +18,8 @@ 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/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/pkg/translator/azure/go.mod b/pkg/translator/azure/go.mod index 877f93ac9763..564e6b82953d 100644 --- a/pkg/translator/azure/go.mod +++ b/pkg/translator/azure/go.mod @@ -6,7 +6,7 @@ require ( github.com/json-iterator/go v1.1.12 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/relvacode/iso8601 v1.5.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/pdata v1.20.0 go.opentelemetry.io/collector/semconv v0.114.0 diff --git a/pkg/translator/azure/go.sum b/pkg/translator/azure/go.sum index 28cf8696e69d..875d5895bf07 100644 --- a/pkg/translator/azure/go.sum +++ b/pkg/translator/azure/go.sum @@ -33,8 +33,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/pkg/translator/azurelogs/go.mod b/pkg/translator/azurelogs/go.mod index 115ddb8a23c5..79d752d4b100 100644 --- a/pkg/translator/azurelogs/go.mod +++ b/pkg/translator/azurelogs/go.mod @@ -6,7 +6,7 @@ require ( github.com/json-iterator/go v1.1.12 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/relvacode/iso8601 v1.5.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/pdata v1.20.0 go.opentelemetry.io/collector/semconv v0.114.0 diff --git a/pkg/translator/azurelogs/go.sum b/pkg/translator/azurelogs/go.sum index 6ad2a1f52568..efcd6cfa6568 100644 --- a/pkg/translator/azurelogs/go.sum +++ b/pkg/translator/azurelogs/go.sum @@ -33,8 +33,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/pkg/translator/jaeger/go.mod b/pkg/translator/jaeger/go.mod index 508b0de64d85..a888277ba9a8 100644 --- a/pkg/translator/jaeger/go.mod +++ b/pkg/translator/jaeger/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/jaegertracing/jaeger v1.62.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/pdata v1.20.0 go.opentelemetry.io/collector/semconv v0.114.0 go.uber.org/goleak v1.3.0 diff --git a/pkg/translator/jaeger/go.sum b/pkg/translator/jaeger/go.sum index 5f99d08e7ea3..4931b2402416 100644 --- a/pkg/translator/jaeger/go.sum +++ b/pkg/translator/jaeger/go.sum @@ -31,8 +31,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.20.0 h1:ePcwt4bdtISP0loHaE+C9xYoU2ZkIvWv89Fob16o9SM= diff --git a/pkg/translator/loki/go.mod b/pkg/translator/loki/go.mod index 821725bc87c7..2cccd9c5ed81 100644 --- a/pkg/translator/loki/go.mod +++ b/pkg/translator/loki/go.mod @@ -10,7 +10,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.114.0 github.com/prometheus/common v0.60.1 github.com/prometheus/prometheus v0.54.1 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/pdata v1.20.0 go.opentelemetry.io/collector/semconv v0.114.0 go.uber.org/goleak v1.3.0 diff --git a/pkg/translator/loki/go.sum b/pkg/translator/loki/go.sum index c3b37f375a13..a09419471cc0 100644 --- a/pkg/translator/loki/go.sum +++ b/pkg/translator/loki/go.sum @@ -93,8 +93,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.20.0 h1:Mi7nMy/q52eruI+6jWnMKUOeM55XvwoPnGcdB1++O8c= diff --git a/pkg/translator/opencensus/go.mod b/pkg/translator/opencensus/go.mod index 9ab0005ea465..c8887e68b1e9 100644 --- a/pkg/translator/opencensus/go.mod +++ b/pkg/translator/opencensus/go.mod @@ -8,7 +8,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opencensus.io v0.24.0 go.opentelemetry.io/collector/pdata v1.20.0 go.opentelemetry.io/collector/semconv v0.114.0 diff --git a/pkg/translator/opencensus/go.sum b/pkg/translator/opencensus/go.sum index e13e8768652b..6887eaccfbbe 100644 --- a/pkg/translator/opencensus/go.sum +++ b/pkg/translator/opencensus/go.sum @@ -69,8 +69,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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/pkg/translator/prometheus/go.mod b/pkg/translator/prometheus/go.mod index 727eb842da29..7faf7c955527 100644 --- a/pkg/translator/prometheus/go.mod +++ b/pkg/translator/prometheus/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/featuregate v1.20.0 go.opentelemetry.io/collector/pdata v1.20.0 go.uber.org/goleak v1.3.0 diff --git a/pkg/translator/prometheus/go.sum b/pkg/translator/prometheus/go.sum index 9b7588052cdf..a60198e7dc38 100644 --- a/pkg/translator/prometheus/go.sum +++ b/pkg/translator/prometheus/go.sum @@ -28,8 +28,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.20.0 h1:Mi7nMy/q52eruI+6jWnMKUOeM55XvwoPnGcdB1++O8c= diff --git a/pkg/translator/prometheus/metadata.yaml b/pkg/translator/prometheus/metadata.yaml index ad3618bcdf56..227ec937663d 100644 --- a/pkg/translator/prometheus/metadata.yaml +++ b/pkg/translator/prometheus/metadata.yaml @@ -1,3 +1,3 @@ status: codeowners: - active: [dashpole, bertysentry] \ No newline at end of file + active: [dashpole, bertysentry, ArthurSens] \ No newline at end of file diff --git a/pkg/translator/prometheusremotewrite/go.mod b/pkg/translator/prometheusremotewrite/go.mod index 58293ad0728f..e930298647cf 100644 --- a/pkg/translator/prometheusremotewrite/go.mod +++ b/pkg/translator/prometheusremotewrite/go.mod @@ -10,7 +10,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.114.0 github.com/prometheus/common v0.60.1 github.com/prometheus/prometheus v0.54.1 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/featuregate v1.20.0 go.opentelemetry.io/collector/pdata v1.20.0 go.opentelemetry.io/collector/semconv v0.114.0 diff --git a/pkg/translator/prometheusremotewrite/go.sum b/pkg/translator/prometheusremotewrite/go.sum index 9caeb11c6ac9..299e485a7dab 100644 --- a/pkg/translator/prometheusremotewrite/go.sum +++ b/pkg/translator/prometheusremotewrite/go.sum @@ -39,8 +39,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.20.0 h1:Mi7nMy/q52eruI+6jWnMKUOeM55XvwoPnGcdB1++O8c= diff --git a/pkg/translator/signalfx/go.mod b/pkg/translator/signalfx/go.mod index 37b0e7cc6a99..f118f63ac12b 100644 --- a/pkg/translator/signalfx/go.mod +++ b/pkg/translator/signalfx/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/pdata v1.20.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 diff --git a/pkg/translator/signalfx/go.sum b/pkg/translator/signalfx/go.sum index cbff07b694b7..efde97e950fd 100644 --- a/pkg/translator/signalfx/go.sum +++ b/pkg/translator/signalfx/go.sum @@ -41,8 +41,8 @@ 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/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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.20.0 h1:ePcwt4bdtISP0loHaE+C9xYoU2ZkIvWv89Fob16o9SM= diff --git a/pkg/translator/skywalking/go.mod b/pkg/translator/skywalking/go.mod index 85475a497e98..975db67c865c 100644 --- a/pkg/translator/skywalking/go.mod +++ b/pkg/translator/skywalking/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/google/uuid v1.6.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/pdata v1.20.0 go.opentelemetry.io/collector/semconv v0.114.0 go.uber.org/goleak v1.3.0 diff --git a/pkg/translator/skywalking/go.sum b/pkg/translator/skywalking/go.sum index a7d8b424adde..55c6ad1dd264 100644 --- a/pkg/translator/skywalking/go.sum +++ b/pkg/translator/skywalking/go.sum @@ -75,8 +75,8 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/pkg/translator/zipkin/go.mod b/pkg/translator/zipkin/go.mod index 3584a04bee72..dc21bda4ddfc 100644 --- a/pkg/translator/zipkin/go.mod +++ b/pkg/translator/zipkin/go.mod @@ -6,7 +6,7 @@ require ( github.com/jaegertracing/jaeger v1.62.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/openzipkin/zipkin-go v0.4.3 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/pdata v1.20.0 go.opentelemetry.io/collector/semconv v0.114.0 go.uber.org/goleak v1.3.0 diff --git a/pkg/translator/zipkin/go.sum b/pkg/translator/zipkin/go.sum index 2b6550cc21b1..5682c41d1921 100644 --- a/pkg/translator/zipkin/go.sum +++ b/pkg/translator/zipkin/go.sum @@ -33,8 +33,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.20.0 h1:ePcwt4bdtISP0loHaE+C9xYoU2ZkIvWv89Fob16o9SM= diff --git a/pkg/winperfcounters/go.mod b/pkg/winperfcounters/go.mod index 31ae8d2dcb05..6d6bbe8809fd 100644 --- a/pkg/winperfcounters/go.mod +++ b/pkg/winperfcounters/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcoun go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.uber.org/goleak v1.3.0 golang.org/x/sys v0.26.0 ) diff --git a/pkg/winperfcounters/go.sum b/pkg/winperfcounters/go.sum index f3f43da97a8b..03f86838b816 100644 --- a/pkg/winperfcounters/go.sum +++ b/pkg/winperfcounters/go.sum @@ -14,8 +14,8 @@ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.26.0 h1:KHjCJyddX0LoSTb3J+vWpupP9p0oznkqVk/IfjymZbo= diff --git a/processor/attributesprocessor/README.md b/processor/attributesprocessor/README.md index f12d22fe0960..f70818718dc2 100644 --- a/processor/attributesprocessor/README.md +++ b/processor/attributesprocessor/README.md @@ -60,7 +60,8 @@ For the actions `insert`, `update` and `upsert`, action: {insert, update, upsert} # FromContext specifies the context value to use to populate the attribute value. # If the key is prefixed with `metadata.`, the values are searched - # in the receiver's transport protocol additional information like gRPC Metadata or HTTP Headers. + # in the receiver's transport protocol additional information like gRPC Metadata or HTTP Headers + # (be sure to set `include_metadata: true` on the receiver). # If the key is prefixed with `auth.`, the values are searched # in the authentication information set by the server authenticator. # Refer to the server authenticator's documentation part of your pipeline for more information about which attributes are available. diff --git a/processor/attributesprocessor/go.mod b/processor/attributesprocessor/go.mod index d22101db3fff..de7fc9336991 100644 --- a/processor/attributesprocessor/go.mod +++ b/processor/attributesprocessor/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/processor/attributesprocessor/go.sum b/processor/attributesprocessor/go.sum index d187885b2ac9..aec0da6a28e3 100644 --- a/processor/attributesprocessor/go.sum +++ b/processor/attributesprocessor/go.sum @@ -80,8 +80,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 h1:SIKIoA4e/5Y9ZOl0DCe3eVMLPOQzJxgZpfdHHeauNTM= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6/go.mod h1:BUbeWZiieNxAuuADTBNb3/aeje6on3DhU3rpWsQSB1E= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/processor/coralogixprocessor/go.mod b/processor/coralogixprocessor/go.mod index e18d0dd830aa..243bf1748607 100644 --- a/processor/coralogixprocessor/go.mod +++ b/processor/coralogixprocessor/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/processor/coral go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/processor/coralogixprocessor/go.sum b/processor/coralogixprocessor/go.sum index 73a8f2145ab4..1540843d5e25 100644 --- a/processor/coralogixprocessor/go.sum +++ b/processor/coralogixprocessor/go.sum @@ -67,8 +67,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/processor/cumulativetodeltaprocessor/go.mod b/processor/cumulativetodeltaprocessor/go.mod index 8e221632aafe..43f1e433a749 100644 --- a/processor/cumulativetodeltaprocessor/go.mod +++ b/processor/cumulativetodeltaprocessor/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/processor/cumulativetodeltaprocessor/go.sum b/processor/cumulativetodeltaprocessor/go.sum index 80a420eb7ebc..725245524f9c 100644 --- a/processor/cumulativetodeltaprocessor/go.sum +++ b/processor/cumulativetodeltaprocessor/go.sum @@ -48,8 +48,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/processor/deltatocumulativeprocessor/go.mod b/processor/deltatocumulativeprocessor/go.mod index 02dfd11f0dc7..d7a925f651f1 100644 --- a/processor/deltatocumulativeprocessor/go.mod +++ b/processor/deltatocumulativeprocessor/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configtelemetry v0.114.0 diff --git a/processor/deltatocumulativeprocessor/go.sum b/processor/deltatocumulativeprocessor/go.sum index dfe96f48d601..7f2104a133fa 100644 --- a/processor/deltatocumulativeprocessor/go.sum +++ b/processor/deltatocumulativeprocessor/go.sum @@ -46,8 +46,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/processor/deltatorateprocessor/go.mod b/processor/deltatorateprocessor/go.mod index 0fc7d14a85a9..d07002889662 100644 --- a/processor/deltatorateprocessor/go.mod +++ b/processor/deltatorateprocessor/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/processor/delta go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/processor/deltatorateprocessor/go.sum b/processor/deltatorateprocessor/go.sum index 837bb5b9034f..7d5521e89cfa 100644 --- a/processor/deltatorateprocessor/go.sum +++ b/processor/deltatorateprocessor/go.sum @@ -44,8 +44,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/processor/filterprocessor/go.mod b/processor/filterprocessor/go.mod index 72c14bf629c9..53f6e49e3174 100644 --- a/processor/filterprocessor/go.mod +++ b/processor/filterprocessor/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configtelemetry v0.114.0 diff --git a/processor/filterprocessor/go.sum b/processor/filterprocessor/go.sum index 238d63954e95..9e584cf6cd66 100644 --- a/processor/filterprocessor/go.sum +++ b/processor/filterprocessor/go.sum @@ -80,8 +80,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 h1:SIKIoA4e/5Y9ZOl0DCe3eVMLPOQzJxgZpfdHHeauNTM= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6/go.mod h1:BUbeWZiieNxAuuADTBNb3/aeje6on3DhU3rpWsQSB1E= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/processor/geoipprocessor/go.mod b/processor/geoipprocessor/go.mod index 3bf793abf78d..039e3162b1a5 100644 --- a/processor/geoipprocessor/go.mod +++ b/processor/geoipprocessor/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/oschwald/geoip2-golang v1.11.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/processor/geoipprocessor/go.sum b/processor/geoipprocessor/go.sum index 02ec3e28c641..d09c33a1961e 100644 --- a/processor/geoipprocessor/go.sum +++ b/processor/geoipprocessor/go.sum @@ -105,8 +105,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/processor/groupbyattrsprocessor/go.mod b/processor/groupbyattrsprocessor/go.mod index 26d585dc3bf8..2bbdaccdb774 100644 --- a/processor/groupbyattrsprocessor/go.mod +++ b/processor/groupbyattrsprocessor/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configtelemetry v0.114.0 diff --git a/processor/groupbyattrsprocessor/go.sum b/processor/groupbyattrsprocessor/go.sum index fd79b200f83f..9267f0a5003b 100644 --- a/processor/groupbyattrsprocessor/go.sum +++ b/processor/groupbyattrsprocessor/go.sum @@ -46,8 +46,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/processor/groupbytraceprocessor/go.mod b/processor/groupbytraceprocessor/go.mod index 0f7ba479b9c5..1a0b527da94f 100644 --- a/processor/groupbytraceprocessor/go.mod +++ b/processor/groupbytraceprocessor/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configtelemetry v0.114.0 diff --git a/processor/groupbytraceprocessor/go.sum b/processor/groupbytraceprocessor/go.sum index 4e4814d682bb..ff3489f76eb6 100644 --- a/processor/groupbytraceprocessor/go.sum +++ b/processor/groupbytraceprocessor/go.sum @@ -44,8 +44,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/processor/intervalprocessor/go.mod b/processor/intervalprocessor/go.mod index eb14972e2971..480024950242 100644 --- a/processor/intervalprocessor/go.mod +++ b/processor/intervalprocessor/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/processor/intervalprocessor/go.sum b/processor/intervalprocessor/go.sum index 0d21dd840910..ffded8d61e68 100644 --- a/processor/intervalprocessor/go.sum +++ b/processor/intervalprocessor/go.sum @@ -46,8 +46,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/processor/k8sattributesprocessor/README.md b/processor/k8sattributesprocessor/README.md index 12a3e4d32f8a..19c12d738c53 100644 --- a/processor/k8sattributesprocessor/README.md +++ b/processor/k8sattributesprocessor/README.md @@ -170,7 +170,7 @@ spec: - --duration=10s - --rate=1 - --otlp-attributes=k8s.container.name="telemetrygen" - image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest + image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:0.112.0@sha256:b248ef911f93ae27cbbc85056d1ffacc87fd941bbdc2ffd951b6df8df72b8096 name: telemetrygen status: podIP: 10.244.0.11 @@ -193,7 +193,8 @@ the processor associates the received trace to the pod, based on the connection "k8s.pod.name": "telemetrygen-pod", "k8s.pod.uid": "038e2267-b473-489b-b48c-46bafdb852eb", "container.image.name": "telemetrygen", - "container.image.tag": "latest" + "container.image.tag": "0.112.0", + "container.image.repo_digests": ["ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen@sha256:b248ef911f93ae27cbbc85056d1ffacc87fd941bbdc2ffd951b6df8df72b8096"] } } ``` diff --git a/processor/k8sattributesprocessor/documentation.md b/processor/k8sattributesprocessor/documentation.md index 67bcb77d2741..fd68ea6a2372 100644 --- a/processor/k8sattributesprocessor/documentation.md +++ b/processor/k8sattributesprocessor/documentation.md @@ -9,7 +9,7 @@ | container.id | Container ID. Usually a UUID, as for example used to identify Docker containers. The UUID might be abbreviated. Requires k8s.container.restart_count. | Any Str | false | | container.image.name | Name of the image the container was built on. Requires container.id or k8s.container.name. | Any Str | true | | container.image.repo_digests | Repo digests of the container image as provided by the container runtime. | Any Slice | false | -| container.image.tag | Container image tag. Requires container.id or k8s.container.name. | Any Str | true | +| container.image.tag | Container image tag. Defaults to "latest" if not provided (unless digest also in image path) Requires container.id or k8s.container.name. | Any Str | true | | k8s.cluster.uid | Gives cluster uid identified with kube-system namespace | Any Str | false | | k8s.container.name | The name of the Container in a Pod template. Requires container.id. | Any Str | false | | k8s.cronjob.name | The name of the CronJob. | Any Str | false | diff --git a/processor/k8sattributesprocessor/e2e_test.go b/processor/k8sattributesprocessor/e2e_test.go index ce1387846719..6e8acb1d19fb 100644 --- a/processor/k8sattributesprocessor/e2e_test.go +++ b/processor/k8sattributesprocessor/e2e_test.go @@ -54,7 +54,7 @@ func newExpectedValue(mode int, value string) *expectedValue { // 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. +// set filter::namespace, and the telemetrygen image has a latest tag but no digest. // 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: // @@ -540,7 +540,8 @@ func TestE2E_ClusterRBAC(t *testing.T) { } } -// Test with `filter::namespace` set and only role binding to collector's SA. We can't get node and namespace labels/annotations. +// Test with `filter::namespace` set and only role binding to collector's SA. We can't get node and namespace labels/annotations, +// and the telemetrygen image has a digest but no tag. func TestE2E_NamespacedRBAC(t *testing.T) { testDir := filepath.Join("testdata", "e2e", "namespacedrbac") @@ -615,7 +616,7 @@ func TestE2E_NamespacedRBAC(t *testing.T) { "k8s.container.name": newExpectedValue(equal, "telemetrygen"), "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), "container.image.repo_digests": newExpectedValue(regex, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen@sha256:[0-9a-fA-f]{64}"), - "container.image.tag": newExpectedValue(equal, "latest"), + "container.image.tag": newExpectedValue(shouldnotexist, ""), "container.id": newExpectedValue(exist, ""), }, }, @@ -639,7 +640,7 @@ func TestE2E_NamespacedRBAC(t *testing.T) { "k8s.container.name": newExpectedValue(equal, "telemetrygen"), "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), "container.image.repo_digests": newExpectedValue(regex, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen@sha256:[0-9a-fA-f]{64}"), - "container.image.tag": newExpectedValue(equal, "latest"), + "container.image.tag": newExpectedValue(shouldnotexist, ""), "container.id": newExpectedValue(exist, ""), }, }, @@ -663,7 +664,7 @@ func TestE2E_NamespacedRBAC(t *testing.T) { "k8s.container.name": newExpectedValue(equal, "telemetrygen"), "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), "container.image.repo_digests": newExpectedValue(regex, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen@sha256:[0-9a-fA-f]{64}"), - "container.image.tag": newExpectedValue(equal, "latest"), + "container.image.tag": newExpectedValue(shouldnotexist, ""), "container.id": newExpectedValue(exist, ""), }, }, @@ -712,7 +713,7 @@ func TestE2E_NamespacedRBAC(t *testing.T) { } // Test with `filter::namespace` set, role binding for namespace-scoped objects (pod, replicaset) and clusterrole -// binding for node and namespace objects. +// binding for node and namespace objects, and the telemetrygen image has a tag and digest. func TestE2E_MixRBAC(t *testing.T) { testDir := filepath.Join("testdata", "e2e", "mixrbac") @@ -802,7 +803,7 @@ func TestE2E_MixRBAC(t *testing.T) { "k8s.container.name": newExpectedValue(equal, "telemetrygen"), "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), "container.image.repo_digests": newExpectedValue(regex, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen@sha256:[0-9a-fA-f]{64}"), - "container.image.tag": newExpectedValue(equal, "latest"), + "container.image.tag": newExpectedValue(equal, "0.112.0"), "container.id": newExpectedValue(exist, ""), "k8s.namespace.labels.foons": newExpectedValue(equal, "barns"), "k8s.node.labels.foo": newExpectedValue(equal, "too"), @@ -829,7 +830,7 @@ func TestE2E_MixRBAC(t *testing.T) { "k8s.container.name": newExpectedValue(equal, "telemetrygen"), "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), "container.image.repo_digests": newExpectedValue(regex, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen@sha256:[0-9a-fA-f]{64}"), - "container.image.tag": newExpectedValue(equal, "latest"), + "container.image.tag": newExpectedValue(equal, "0.112.0"), "container.id": newExpectedValue(exist, ""), "k8s.namespace.labels.foons": newExpectedValue(equal, "barns"), "k8s.node.labels.foo": newExpectedValue(equal, "too"), @@ -856,7 +857,7 @@ func TestE2E_MixRBAC(t *testing.T) { "k8s.container.name": newExpectedValue(equal, "telemetrygen"), "container.image.name": newExpectedValue(equal, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen"), "container.image.repo_digests": newExpectedValue(regex, "ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen@sha256:[0-9a-fA-f]{64}"), - "container.image.tag": newExpectedValue(equal, "latest"), + "container.image.tag": newExpectedValue(equal, "0.112.0"), "container.id": newExpectedValue(exist, ""), "k8s.namespace.labels.foons": newExpectedValue(equal, "barns"), "k8s.node.labels.foo": newExpectedValue(equal, "too"), @@ -914,7 +915,8 @@ func TestE2E_MixRBAC(t *testing.T) { // While `k8s.pod.ip` is not set in `k8sattributes:extract:metadata` and the `pod_association` is not `connection` // we expect that the `k8s.pod.ip` metadata is not added. // While `container.image.repo_digests` is not set in `k8sattributes::extract::metadata`, we expect -// that the `container.image.repo_digests` metadata is not added +// that the `container.image.repo_digests` metadata is not added. +// The telemetrygen image has neither a tag nor digest (implicitly latest version) func TestE2E_NamespacedRBACNoPodIP(t *testing.T) { testDir := filepath.Join("testdata", "e2e", "namespaced_rbac_no_pod_ip") diff --git a/processor/k8sattributesprocessor/go.mod b/processor/k8sattributesprocessor/go.mod index 851c6c3ec039..e80ccc494f52 100644 --- a/processor/k8sattributesprocessor/go.mod +++ b/processor/k8sattributesprocessor/go.mod @@ -9,7 +9,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/client v1.20.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 @@ -38,9 +38,9 @@ require ( go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - k8s.io/api v0.31.2 - k8s.io/apimachinery v0.31.2 - k8s.io/client-go v0.31.2 + k8s.io/api v0.31.3 + k8s.io/apimachinery v0.31.3 + k8s.io/client-go v0.31.3 ) require ( diff --git a/processor/k8sattributesprocessor/go.sum b/processor/k8sattributesprocessor/go.sum index 91183f7e8808..057819f9b314 100644 --- a/processor/k8sattributesprocessor/go.sum +++ b/processor/k8sattributesprocessor/go.sum @@ -1206,8 +1206,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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -2085,14 +2085,14 @@ 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.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= -k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= -k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= -k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= 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= diff --git a/processor/k8sattributesprocessor/internal/kube/client.go b/processor/k8sattributesprocessor/internal/kube/client.go index bf8746b3e8ef..a984e7f85cbd 100644 --- a/processor/k8sattributesprocessor/internal/kube/client.go +++ b/processor/k8sattributesprocessor/internal/kube/client.go @@ -666,6 +666,30 @@ func removeUnnecessaryPodData(pod *api_v1.Pod, rules ExtractionRules) *api_v1.Po return &transformedPod } +// parseNameAndTagFromImage parses the image name and tag for differently-formatted image names. +// returns "latest" as the default if tag not present. also checks if the image contains a digest. +// if it does, no latest tag is assumed. +func parseNameAndTagFromImage(image string) (name, tag string, err error) { + ref, err := reference.Parse(image) + if err != nil { + return + } + namedRef, ok := ref.(reference.Named) + if !ok { + return "", "", errors.New("cannot retrieve image name") + } + name = namedRef.Name() + if taggedRef, ok := namedRef.(reference.Tagged); ok { + tag = taggedRef.Tag() + } + if tag == "" { + if digestedRef, ok := namedRef.(reference.Digested); !ok || digestedRef.String() == "" { + tag = "latest" + } + } + return +} + func (c *WatchClient) extractPodContainersAttributes(pod *api_v1.Pod) PodContainers { containers := PodContainers{ ByID: map[string]*Container{}, @@ -677,16 +701,14 @@ func (c *WatchClient) extractPodContainersAttributes(pod *api_v1.Pod) PodContain if c.Rules.ContainerImageName || c.Rules.ContainerImageTag { for _, spec := range append(pod.Spec.Containers, pod.Spec.InitContainers...) { container := &Container{} - nameTagSep := strings.LastIndex(spec.Image, ":") - if c.Rules.ContainerImageName { - if nameTagSep > 0 { - container.ImageName = spec.Image[:nameTagSep] - } else { - container.ImageName = spec.Image + name, tag, err := parseNameAndTagFromImage(spec.Image) + if err == nil { + if c.Rules.ContainerImageName { + container.ImageName = name + } + if c.Rules.ContainerImageTag { + container.ImageTag = tag } - } - if c.Rules.ContainerImageTag && nameTagSep > 0 { - container.ImageTag = spec.Image[nameTagSep+1:] } containers.ByName[spec.Name] = container } diff --git a/processor/k8sattributesprocessor/internal/kube/client_test.go b/processor/k8sattributesprocessor/internal/kube/client_test.go index f5e9cd03bfdc..f05e84f227d4 100644 --- a/processor/k8sattributesprocessor/internal/kube/client_test.go +++ b/processor/k8sattributesprocessor/internal/kube/client_test.go @@ -1495,17 +1495,21 @@ func Test_extractPodContainersAttributes(t *testing.T) { Containers: []api_v1.Container{ { Name: "container1", - Image: "test/image1:0.1.0", + Image: "example.com:5000/test/image1:0.1.0", }, { Name: "container2", - Image: "example.com:port1/image2:0.2.0", + Image: "example.com:81/image2@sha256:430ac608abaa332de4ce45d68534447c7a206edc5e98aaff9923ecc12f8a80d9", + }, + { + Name: "container3", + Image: "example-website.com/image3:1.0@sha256:4b0b1b6f6cdd3e5b9e55f74a1e8d19ed93a3f5a04c6b6c3c57c4e6d19f6b7c4d", }, }, InitContainers: []api_v1.Container{ { Name: "init_container", - Image: "test/init-image:1.0.2", + Image: "test/init-image", }, }, }, @@ -1520,7 +1524,13 @@ func Test_extractPodContainersAttributes(t *testing.T) { { Name: "container2", ContainerID: "docker://container2-id-456", - ImageID: "sha256:430ac608abaa332de4ce45d68534447c7a206edc5e98aaff9923ecc12f8a80d9", + ImageID: "sha256:4b0b1b6f6cdd3e5b9e55f74a1e8d19ed93a3f5a04c6b6c3c57c4e6d19f6b7c4d", + RestartCount: 2, + }, + { + Name: "container3", + ContainerID: "docker://container3-id-abc", + ImageID: "docker.io/otel/collector:2.0.0@sha256:430ac608abaa332de4ce45d68534447c7a206edc5e98aaff9923ecc12f8a80d9", RestartCount: 2, }, }, @@ -1564,13 +1574,15 @@ func Test_extractPodContainersAttributes(t *testing.T) { pod: &pod, want: PodContainers{ ByID: map[string]*Container{ - "container1-id-123": {ImageName: "test/image1"}, - "container2-id-456": {ImageName: "example.com:port1/image2"}, + "container1-id-123": {ImageName: "example.com:5000/test/image1"}, + "container2-id-456": {ImageName: "example.com:81/image2"}, + "container3-id-abc": {ImageName: "example-website.com/image3"}, "init-container-id-789": {ImageName: "test/init-image"}, }, ByName: map[string]*Container{ - "container1": {ImageName: "test/image1"}, - "container2": {ImageName: "example.com:port1/image2"}, + "container1": {ImageName: "example.com:5000/test/image1"}, + "container2": {ImageName: "example.com:81/image2"}, + "container3": {ImageName: "example-website.com/image3"}, "init_container": {ImageName: "test/init-image"}, }, }, @@ -1615,6 +1627,11 @@ func Test_extractPodContainersAttributes(t *testing.T) { 2: {ContainerID: "container2-id-456"}, }, }, + "container3-id-abc": { + Statuses: map[int]ContainerStatus{ + 2: {ContainerID: "container3-id-abc"}, + }, + }, "init-container-id-789": { Statuses: map[int]ContainerStatus{ 0: {ContainerID: "init-container-id-789"}, @@ -1632,6 +1649,11 @@ func Test_extractPodContainersAttributes(t *testing.T) { 2: {ContainerID: "container2-id-456"}, }, }, + "container3": { + Statuses: map[int]ContainerStatus{ + 2: {ContainerID: "container3-id-abc"}, + }, + }, "init_container": { Statuses: map[int]ContainerStatus{ 0: {ContainerID: "init-container-id-789"}, @@ -1658,6 +1680,11 @@ func Test_extractPodContainersAttributes(t *testing.T) { 2: {}, }, }, + "container3-id-abc": { + Statuses: map[int]ContainerStatus{ + 2: {ImageRepoDigest: "docker.io/otel/collector:2.0.0@sha256:430ac608abaa332de4ce45d68534447c7a206edc5e98aaff9923ecc12f8a80d9"}, + }, + }, "init-container-id-789": { Statuses: map[int]ContainerStatus{ 0: {ImageRepoDigest: "ghcr.io/initimage1@sha256:42e8ba40f9f70d604684c3a2a0ed321206b7e2e3509fdb2c8836d34f2edfb57b"}, @@ -1675,6 +1702,11 @@ func Test_extractPodContainersAttributes(t *testing.T) { 2: {}, }, }, + "container3": { + Statuses: map[int]ContainerStatus{ + 2: {ImageRepoDigest: "docker.io/otel/collector:2.0.0@sha256:430ac608abaa332de4ce45d68534447c7a206edc5e98aaff9923ecc12f8a80d9"}, + }, + }, "init_container": { Statuses: map[int]ContainerStatus{ 0: {ImageRepoDigest: "ghcr.io/initimage1@sha256:42e8ba40f9f70d604684c3a2a0ed321206b7e2e3509fdb2c8836d34f2edfb57b"}, @@ -1695,22 +1727,28 @@ func Test_extractPodContainersAttributes(t *testing.T) { want: PodContainers{ ByID: map[string]*Container{ "container1-id-123": { - ImageName: "test/image1", + ImageName: "example.com:5000/test/image1", ImageTag: "0.1.0", Statuses: map[int]ContainerStatus{ 0: {ContainerID: "container1-id-123", ImageRepoDigest: "docker.io/otel/collector@sha256:55d008bc28344c3178645d40e7d07df30f9d90abe4b53c3fc4e5e9c0295533da"}, }, }, "container2-id-456": { - ImageName: "example.com:port1/image2", - ImageTag: "0.2.0", + ImageName: "example.com:81/image2", Statuses: map[int]ContainerStatus{ 2: {ContainerID: "container2-id-456"}, }, }, + "container3-id-abc": { + ImageName: "example-website.com/image3", + ImageTag: "1.0", + Statuses: map[int]ContainerStatus{ + 2: {ContainerID: "container3-id-abc", ImageRepoDigest: "docker.io/otel/collector:2.0.0@sha256:430ac608abaa332de4ce45d68534447c7a206edc5e98aaff9923ecc12f8a80d9"}, + }, + }, "init-container-id-789": { ImageName: "test/init-image", - ImageTag: "1.0.2", + ImageTag: "latest", Statuses: map[int]ContainerStatus{ 0: {ContainerID: "init-container-id-789", ImageRepoDigest: "ghcr.io/initimage1@sha256:42e8ba40f9f70d604684c3a2a0ed321206b7e2e3509fdb2c8836d34f2edfb57b"}, }, @@ -1718,22 +1756,28 @@ func Test_extractPodContainersAttributes(t *testing.T) { }, ByName: map[string]*Container{ "container1": { - ImageName: "test/image1", + ImageName: "example.com:5000/test/image1", ImageTag: "0.1.0", Statuses: map[int]ContainerStatus{ 0: {ContainerID: "container1-id-123", ImageRepoDigest: "docker.io/otel/collector@sha256:55d008bc28344c3178645d40e7d07df30f9d90abe4b53c3fc4e5e9c0295533da"}, }, }, "container2": { - ImageName: "example.com:port1/image2", - ImageTag: "0.2.0", + ImageName: "example.com:81/image2", Statuses: map[int]ContainerStatus{ 2: {ContainerID: "container2-id-456"}, }, }, + "container3": { + ImageName: "example-website.com/image3", + ImageTag: "1.0", + Statuses: map[int]ContainerStatus{ + 2: {ContainerID: "container3-id-abc", ImageRepoDigest: "docker.io/otel/collector:2.0.0@sha256:430ac608abaa332de4ce45d68534447c7a206edc5e98aaff9923ecc12f8a80d9"}, + }, + }, "init_container": { ImageName: "test/init-image", - ImageTag: "1.0.2", + ImageTag: "latest", Statuses: map[int]ContainerStatus{ 0: {ContainerID: "init-container-id-789", ImageRepoDigest: "ghcr.io/initimage1@sha256:42e8ba40f9f70d604684c3a2a0ed321206b7e2e3509fdb2c8836d34f2edfb57b"}, }, diff --git a/processor/k8sattributesprocessor/metadata.yaml b/processor/k8sattributesprocessor/metadata.yaml index edfb8bbc414d..fb4d8f863eca 100644 --- a/processor/k8sattributesprocessor/metadata.yaml +++ b/processor/k8sattributesprocessor/metadata.yaml @@ -108,7 +108,7 @@ resource_attributes: type: slice enabled: false container.image.tag: - description: Container image tag. Requires container.id or k8s.container.name. + description: Container image tag. Defaults to "latest" if not provided (unless digest also in image path) Requires container.id or k8s.container.name. type: string enabled: true diff --git a/processor/k8sattributesprocessor/processor_test.go b/processor/k8sattributesprocessor/processor_test.go index 790c612549b2..875d9119bb60 100644 --- a/processor/k8sattributesprocessor/processor_test.go +++ b/processor/k8sattributesprocessor/processor_test.go @@ -1192,7 +1192,7 @@ func TestProcessorAddContainerAttributes(t *testing.T) { ByName: map[string]*kube.Container{ "app": { Statuses: map[int]kube.ContainerStatus{ - 2: {ImageRepoDigest: "docker.io/otel/collector@sha256:deadbeef02"}, + 2: {ImageRepoDigest: "docker.io/otel/collector:1.2.3@sha256:deadbeef02"}, }, }, }, @@ -1206,7 +1206,7 @@ func TestProcessorAddContainerAttributes(t *testing.T) { wantAttrs: map[string]any{ kube.K8sIPLabelName: "1.1.1.1", conventions.AttributeK8SContainerName: "app", - containerImageRepoDigests: []string{"docker.io/otel/collector@sha256:deadbeef02"}, + containerImageRepoDigests: []string{"docker.io/otel/collector:1.2.3@sha256:deadbeef02"}, }, }, { diff --git a/processor/k8sattributesprocessor/testdata/e2e/mixrbac/telemetrygen/deployment.yaml b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/telemetrygen/deployment.yaml index a09257347f5e..32a2f063566e 100644 --- a/processor/k8sattributesprocessor/testdata/e2e/mixrbac/telemetrygen/deployment.yaml +++ b/processor/k8sattributesprocessor/testdata/e2e/mixrbac/telemetrygen/deployment.yaml @@ -28,7 +28,7 @@ spec: {{- if eq .DataType "traces" }} - --status-code= {{- end }} - image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest + image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:0.112.0@sha256:b248ef911f93ae27cbbc85056d1ffacc87fd941bbdc2ffd951b6df8df72b8096 imagePullPolicy: IfNotPresent name: telemetrygen restartPolicy: Always diff --git a/processor/k8sattributesprocessor/testdata/e2e/namespaced_rbac_no_pod_ip/telemetrygen/deployment.yaml b/processor/k8sattributesprocessor/testdata/e2e/namespaced_rbac_no_pod_ip/telemetrygen/deployment.yaml index 953e21514e60..b64a7ac87acf 100644 --- a/processor/k8sattributesprocessor/testdata/e2e/namespaced_rbac_no_pod_ip/telemetrygen/deployment.yaml +++ b/processor/k8sattributesprocessor/testdata/e2e/namespaced_rbac_no_pod_ip/telemetrygen/deployment.yaml @@ -30,7 +30,7 @@ spec: {{- if eq .DataType "traces" }} - --status-code= {{- end }} - image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest + image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen imagePullPolicy: IfNotPresent name: telemetrygen restartPolicy: Always diff --git a/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/telemetrygen/deployment.yaml b/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/telemetrygen/deployment.yaml index fd56c39d4eff..18f35425807a 100644 --- a/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/telemetrygen/deployment.yaml +++ b/processor/k8sattributesprocessor/testdata/e2e/namespacedrbac/telemetrygen/deployment.yaml @@ -29,7 +29,7 @@ spec: {{- if eq .DataType "traces" }} - --status-code= {{- end }} - image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen:latest + image: ghcr.io/open-telemetry/opentelemetry-collector-contrib/telemetrygen@sha256:b248ef911f93ae27cbbc85056d1ffacc87fd941bbdc2ffd951b6df8df72b8096 imagePullPolicy: IfNotPresent name: telemetrygen restartPolicy: Always diff --git a/processor/logdedupprocessor/go.mod b/processor/logdedupprocessor/go.mod index b5914a41b93c..08e4769ea0bd 100644 --- a/processor/logdedupprocessor/go.mod +++ b/processor/logdedupprocessor/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configtelemetry v0.114.0 diff --git a/processor/logdedupprocessor/go.sum b/processor/logdedupprocessor/go.sum index 54cec806e1fa..b98c0535f100 100644 --- a/processor/logdedupprocessor/go.sum +++ b/processor/logdedupprocessor/go.sum @@ -76,8 +76,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 h1:SIKIoA4e/5Y9ZOl0DCe3eVMLPOQzJxgZpfdHHeauNTM= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6/go.mod h1:BUbeWZiieNxAuuADTBNb3/aeje6on3DhU3rpWsQSB1E= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/processor/logstransformprocessor/go.mod b/processor/logstransformprocessor/go.mod index 6be2c48cacf5..b56c12ec27d7 100644 --- a/processor/logstransformprocessor/go.mod +++ b/processor/logstransformprocessor/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 go.opentelemetry.io/collector/consumer v0.114.0 diff --git a/processor/logstransformprocessor/go.sum b/processor/logstransformprocessor/go.sum index 8d872e66cd99..77ace939bebe 100644 --- a/processor/logstransformprocessor/go.sum +++ b/processor/logstransformprocessor/go.sum @@ -65,8 +65,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/processor/metricsgenerationprocessor/go.mod b/processor/metricsgenerationprocessor/go.mod index a48e210c9263..a0d415b1a59b 100644 --- a/processor/metricsgenerationprocessor/go.mod +++ b/processor/metricsgenerationprocessor/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/processor/metricsgenerationprocessor/go.sum b/processor/metricsgenerationprocessor/go.sum index ef9c5786810d..ff6cf189a2b6 100644 --- a/processor/metricsgenerationprocessor/go.sum +++ b/processor/metricsgenerationprocessor/go.sum @@ -48,8 +48,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/processor/metricstransformprocessor/go.mod b/processor/metricstransformprocessor/go.mod index e7e628e000ee..2a90186c48c4 100644 --- a/processor/metricstransformprocessor/go.mod +++ b/processor/metricstransformprocessor/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/processor/metricstransformprocessor/go.sum b/processor/metricstransformprocessor/go.sum index dbc3cb7d402c..c7077a4eb8de 100644 --- a/processor/metricstransformprocessor/go.sum +++ b/processor/metricstransformprocessor/go.sum @@ -46,8 +46,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/processor/probabilisticsamplerprocessor/go.mod b/processor/probabilisticsamplerprocessor/go.mod index 8870bd21019f..7c90a2db569e 100644 --- a/processor/probabilisticsamplerprocessor/go.mod +++ b/processor/probabilisticsamplerprocessor/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/sampling v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configtelemetry v0.114.0 diff --git a/processor/probabilisticsamplerprocessor/go.sum b/processor/probabilisticsamplerprocessor/go.sum index a5d0278f86c4..f02746786e51 100644 --- a/processor/probabilisticsamplerprocessor/go.sum +++ b/processor/probabilisticsamplerprocessor/go.sum @@ -97,8 +97,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/processor/redactionprocessor/go.mod b/processor/redactionprocessor/go.mod index 28ff4e2de15f..9062d6ae52ee 100644 --- a/processor/redactionprocessor/go.mod +++ b/processor/redactionprocessor/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/processor/redac go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/processor/redactionprocessor/go.sum b/processor/redactionprocessor/go.sum index 8ac87144112d..3f182e437155 100644 --- a/processor/redactionprocessor/go.sum +++ b/processor/redactionprocessor/go.sum @@ -44,8 +44,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/processor/remotetapprocessor/go.mod b/processor/remotetapprocessor/go.mod index 52aba748ac90..3fcae352db9f 100644 --- a/processor/remotetapprocessor/go.mod +++ b/processor/remotetapprocessor/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/processor/remotetapprocessor/go.sum b/processor/remotetapprocessor/go.sum index 1398efcdda58..4347af704225 100644 --- a/processor/remotetapprocessor/go.sum +++ b/processor/remotetapprocessor/go.sum @@ -58,8 +58,8 @@ github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/processor/resourcedetectionprocessor/go.mod b/processor/resourcedetectionprocessor/go.mod index ac1aa4ea5c8f..47193fc2c7b3 100644 --- a/processor/resourcedetectionprocessor/go.mod +++ b/processor/resourcedetectionprocessor/go.mod @@ -13,7 +13,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.114.0 github.com/shirou/gopsutil/v4 v4.24.10 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 @@ -34,8 +34,8 @@ require ( go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - k8s.io/apimachinery v0.31.2 - k8s.io/client-go v0.31.2 + k8s.io/apimachinery v0.31.3 + k8s.io/client-go v0.31.3 ) require ( @@ -148,7 +148,7 @@ require ( 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.31.2 // indirect + k8s.io/api v0.31.3 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect diff --git a/processor/resourcedetectionprocessor/go.sum b/processor/resourcedetectionprocessor/go.sum index 3eb39f8c690e..a7ce0a2b21b1 100644 --- a/processor/resourcedetectionprocessor/go.sum +++ b/processor/resourcedetectionprocessor/go.sum @@ -441,8 +441,8 @@ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= @@ -830,14 +830,14 @@ 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.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= -k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= -k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= -k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= 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= diff --git a/processor/resourceprocessor/go.mod b/processor/resourceprocessor/go.mod index f3aa3ba94a1c..f79bd67684e6 100644 --- a/processor/resourceprocessor/go.mod +++ b/processor/resourceprocessor/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/processor/resourceprocessor/go.sum b/processor/resourceprocessor/go.sum index f7aaca7d9e50..5669d5a1652d 100644 --- a/processor/resourceprocessor/go.sum +++ b/processor/resourceprocessor/go.sum @@ -46,8 +46,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/processor/routingprocessor/go.mod b/processor/routingprocessor/go.mod index 6c7400dce893..4ae3eb21cee0 100644 --- a/processor/routingprocessor/go.mod +++ b/processor/routingprocessor/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/client v1.20.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/processor/routingprocessor/go.sum b/processor/routingprocessor/go.sum index afda377a3c7a..7d7f27508df8 100644 --- a/processor/routingprocessor/go.sum +++ b/processor/routingprocessor/go.sum @@ -82,8 +82,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 h1:SIKIoA4e/5Y9ZOl0DCe3eVMLPOQzJxgZpfdHHeauNTM= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6/go.mod h1:BUbeWZiieNxAuuADTBNb3/aeje6on3DhU3rpWsQSB1E= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/processor/schemaprocessor/go.mod b/processor/schemaprocessor/go.mod index 64b0164ffd1a..90b8c30da375 100644 --- a/processor/schemaprocessor/go.mod +++ b/processor/schemaprocessor/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/processor/schem go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 diff --git a/processor/schemaprocessor/go.sum b/processor/schemaprocessor/go.sum index 6136a8090f58..7fe3b76314fd 100644 --- a/processor/schemaprocessor/go.sum +++ b/processor/schemaprocessor/go.sum @@ -56,8 +56,8 @@ github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/processor/spanprocessor/go.mod b/processor/spanprocessor/go.mod index 30b1b37833db..fdb9516ae9df 100644 --- a/processor/spanprocessor/go.mod +++ b/processor/spanprocessor/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/processor/spanprocessor/go.sum b/processor/spanprocessor/go.sum index b5f2a6e5e7d8..12632032a0bd 100644 --- a/processor/spanprocessor/go.sum +++ b/processor/spanprocessor/go.sum @@ -78,8 +78,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 h1:SIKIoA4e/5Y9ZOl0DCe3eVMLPOQzJxgZpfdHHeauNTM= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6/go.mod h1:BUbeWZiieNxAuuADTBNb3/aeje6on3DhU3rpWsQSB1E= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/processor/spanprocessor/span_test.go b/processor/spanprocessor/span_test.go index c25a059d1f6d..437873b1e962 100644 --- a/processor/spanprocessor/span_test.go +++ b/processor/spanprocessor/span_test.go @@ -462,7 +462,8 @@ func TestSpanProcessor_ToAttributes(t *testing.T) { { rules: []string{ `^\/api\/.*\/document\/(?P.*)\/update\/3$`, - `^\/api\/(?P.*)\/document\/.*\/update\/3$`}, + `^\/api\/(?P.*)\/document\/.*\/update\/3$`, + }, testCase: testCase{ inputName: "/api/v1/document/321083210/update/3", outputName: "/api/v1/document/321083210/update/3", @@ -478,7 +479,8 @@ func TestSpanProcessor_ToAttributes(t *testing.T) { { rules: []string{ `^\/api\/v1\/document\/(?P.*)\/update\/4$`, - `^\/api\/(?P.*)\/document\/(?P.*)\/update\/4$`}, + `^\/api\/(?P.*)\/document\/(?P.*)\/update\/4$`, + }, testCase: testCase{ inputName: "/api/v1/document/321083210/update/4", outputName: "/api/v1/document/{documentId}/update/4", diff --git a/processor/sumologicprocessor/go.mod b/processor/sumologicprocessor/go.mod index 706ed1ab8a22..9c15d270d20b 100644 --- a/processor/sumologicprocessor/go.mod +++ b/processor/sumologicprocessor/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/processor/sumol go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/processor/sumologicprocessor/go.sum b/processor/sumologicprocessor/go.sum index 0c60c52a032b..34cb995af829 100644 --- a/processor/sumologicprocessor/go.sum +++ b/processor/sumologicprocessor/go.sum @@ -99,8 +99,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/processor/tailsamplingprocessor/go.mod b/processor/tailsamplingprocessor/go.mod index aae6f36991d9..e87a8dab070b 100644 --- a/processor/tailsamplingprocessor/go.mod +++ b/processor/tailsamplingprocessor/go.mod @@ -9,7 +9,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/config/configtelemetry v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/processor/tailsamplingprocessor/go.sum b/processor/tailsamplingprocessor/go.sum index c2672807f138..bf0cceacc7cd 100644 --- a/processor/tailsamplingprocessor/go.sum +++ b/processor/tailsamplingprocessor/go.sum @@ -76,8 +76,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 h1:SIKIoA4e/5Y9ZOl0DCe3eVMLPOQzJxgZpfdHHeauNTM= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6/go.mod h1:BUbeWZiieNxAuuADTBNb3/aeje6on3DhU3rpWsQSB1E= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/processor/transformprocessor/go.mod b/processor/transformprocessor/go.mod index f519d2a4f657..76ba693be501 100644 --- a/processor/transformprocessor/go.mod +++ b/processor/transformprocessor/go.mod @@ -9,7 +9,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 go.opentelemetry.io/collector/consumer v0.114.0 diff --git a/processor/transformprocessor/go.sum b/processor/transformprocessor/go.sum index b5f2a6e5e7d8..12632032a0bd 100644 --- a/processor/transformprocessor/go.sum +++ b/processor/transformprocessor/go.sum @@ -78,8 +78,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 h1:SIKIoA4e/5Y9ZOl0DCe3eVMLPOQzJxgZpfdHHeauNTM= github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6/go.mod h1:BUbeWZiieNxAuuADTBNb3/aeje6on3DhU3rpWsQSB1E= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/receiver/activedirectorydsreceiver/go.mod b/receiver/activedirectorydsreceiver/go.mod index e1d710d5a00b..0d3670f810e1 100644 --- a/receiver/activedirectorydsreceiver/go.mod +++ b/receiver/activedirectorydsreceiver/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/receiver/activedirectorydsreceiver/go.sum b/receiver/activedirectorydsreceiver/go.sum index 2339dccc57e5..834684884fdf 100644 --- a/receiver/activedirectorydsreceiver/go.sum +++ b/receiver/activedirectorydsreceiver/go.sum @@ -46,8 +46,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/receiver/aerospikereceiver/go.mod b/receiver/aerospikereceiver/go.mod index 722a5fc6a237..b3705ce53433 100644 --- a/receiver/aerospikereceiver/go.mod +++ b/receiver/aerospikereceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.34.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/aerospikereceiver/go.sum b/receiver/aerospikereceiver/go.sum index d21c5a2d6906..58aa71524443 100644 --- a/receiver/aerospikereceiver/go.sum +++ b/receiver/aerospikereceiver/go.sum @@ -130,8 +130,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/apachereceiver/go.mod b/receiver/apachereceiver/go.mod index 91332a8f9af3..d806a17f2c9b 100644 --- a/receiver/apachereceiver/go.mod +++ b/receiver/apachereceiver/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.34.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/apachereceiver/go.sum b/receiver/apachereceiver/go.sum index 76a2d75445f0..751030885ec7 100644 --- a/receiver/apachereceiver/go.sum +++ b/receiver/apachereceiver/go.sum @@ -126,8 +126,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/apachesparkreceiver/go.mod b/receiver/apachesparkreceiver/go.mod index 35d6a58d720b..e3171c05cc79 100644 --- a/receiver/apachesparkreceiver/go.mod +++ b/receiver/apachesparkreceiver/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.34.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/apachesparkreceiver/go.sum b/receiver/apachesparkreceiver/go.sum index 76a2d75445f0..751030885ec7 100644 --- a/receiver/apachesparkreceiver/go.sum +++ b/receiver/apachesparkreceiver/go.sum @@ -126,8 +126,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/awscloudwatchmetricsreceiver/go.mod b/receiver/awscloudwatchmetricsreceiver/go.mod index c5e18e19b350..40b2364d43a9 100644 --- a/receiver/awscloudwatchmetricsreceiver/go.mod +++ b/receiver/awscloudwatchmetricsreceiver/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsclo go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/receiver/awscloudwatchmetricsreceiver/go.sum b/receiver/awscloudwatchmetricsreceiver/go.sum index aadadb6cb45c..fc3055724631 100644 --- a/receiver/awscloudwatchmetricsreceiver/go.sum +++ b/receiver/awscloudwatchmetricsreceiver/go.sum @@ -44,8 +44,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/receiver/awscloudwatchreceiver/go.mod b/receiver/awscloudwatchreceiver/go.mod index cf3a1a60f0db..677fca29725c 100644 --- a/receiver/awscloudwatchreceiver/go.mod +++ b/receiver/awscloudwatchreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go v1.55.5 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/receiver/awscloudwatchreceiver/go.sum b/receiver/awscloudwatchreceiver/go.sum index efd1e24ce1a9..79fe59dd68ea 100644 --- a/receiver/awscloudwatchreceiver/go.sum +++ b/receiver/awscloudwatchreceiver/go.sum @@ -54,8 +54,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/receiver/awscontainerinsightreceiver/go.mod b/receiver/awscontainerinsightreceiver/go.mod index a46ec20c3315..9346712a323e 100644 --- a/receiver/awscontainerinsightreceiver/go.mod +++ b/receiver/awscontainerinsightreceiver/go.mod @@ -12,7 +12,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.114.0 github.com/shirou/gopsutil/v4 v4.24.10 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 @@ -24,9 +24,9 @@ require ( go.opentelemetry.io/collector/receiver/receivertest v0.114.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - k8s.io/api v0.31.2 - k8s.io/apimachinery v0.31.2 - k8s.io/client-go v0.31.2 + k8s.io/api v0.31.3 + k8s.io/apimachinery v0.31.3 + k8s.io/client-go v0.31.3 k8s.io/klog/v2 v2.130.1 ) diff --git a/receiver/awscontainerinsightreceiver/go.sum b/receiver/awscontainerinsightreceiver/go.sum index 94600b207cb9..0ca8d662a4f1 100644 --- a/receiver/awscontainerinsightreceiver/go.sum +++ b/receiver/awscontainerinsightreceiver/go.sum @@ -362,8 +362,8 @@ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -727,14 +727,14 @@ 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.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= -k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= -k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= -k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= 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= diff --git a/receiver/awsecscontainermetricsreceiver/go.mod b/receiver/awsecscontainermetricsreceiver/go.mod index 381236b33821..0bfb35599050 100644 --- a/receiver/awsecscontainermetricsreceiver/go.mod +++ b/receiver/awsecscontainermetricsreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/aws/aws-sdk-go v1.55.5 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 diff --git a/receiver/awsecscontainermetricsreceiver/go.sum b/receiver/awsecscontainermetricsreceiver/go.sum index 2359d031344f..0baf2ea88598 100644 --- a/receiver/awsecscontainermetricsreceiver/go.sum +++ b/receiver/awsecscontainermetricsreceiver/go.sum @@ -60,8 +60,8 @@ github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/receiver/awsfirehosereceiver/go.mod b/receiver/awsfirehosereceiver/go.mod index 900f9ba2e2b5..018c9220cd77 100644 --- a/receiver/awsfirehosereceiver/go.mod +++ b/receiver/awsfirehosereceiver/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/gogo/protobuf v1.3.2 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/awsfirehosereceiver/go.sum b/receiver/awsfirehosereceiver/go.sum index 1fc55f1c39c1..f179b73141c6 100644 --- a/receiver/awsfirehosereceiver/go.sum +++ b/receiver/awsfirehosereceiver/go.sum @@ -58,8 +58,8 @@ github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/receiver/awsfirehosereceiver/internal/unmarshaler/cwlog/logsbuilder.go b/receiver/awsfirehosereceiver/internal/unmarshaler/cwlog/logsbuilder.go index eae5902b5ea1..5dc7a3db59f8 100644 --- a/receiver/awsfirehosereceiver/internal/unmarshaler/cwlog/logsbuilder.go +++ b/receiver/awsfirehosereceiver/internal/unmarshaler/cwlog/logsbuilder.go @@ -4,6 +4,8 @@ package cwlog // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsfirehosereceiver/internal/unmarshaler/cwlog" import ( + "time" + "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/plog" conventions "go.opentelemetry.io/collector/semconv/v1.6.1" @@ -44,7 +46,9 @@ func newResourceLogsBuilder(logs plog.Logs, attrs resourceAttributes) *resourceL func (rlb *resourceLogsBuilder) AddLog(log cWLog) { for _, event := range log.LogEvents { logLine := rlb.rls.AppendEmpty() - logLine.SetTimestamp(pcommon.Timestamp(event.Timestamp)) + // pcommon.Timestamp is a time specified as UNIX Epoch time in nanoseconds + // but timestamp in cloudwatch logs are in milliseconds. + logLine.SetTimestamp(pcommon.Timestamp(event.Timestamp * int64(time.Millisecond))) logLine.Body().SetStr(event.Message) } } diff --git a/receiver/awsfirehosereceiver/internal/unmarshaler/cwlog/unmarshaler_test.go b/receiver/awsfirehosereceiver/internal/unmarshaler/cwlog/unmarshaler_test.go index fbd683939aa5..71b49295df60 100644 --- a/receiver/awsfirehosereceiver/internal/unmarshaler/cwlog/unmarshaler_test.go +++ b/receiver/awsfirehosereceiver/internal/unmarshaler/cwlog/unmarshaler_test.go @@ -81,3 +81,25 @@ func TestUnmarshal(t *testing.T) { }) } } + +func TestLogTimestamp(t *testing.T) { + unmarshaler := NewUnmarshaler(zap.NewNop()) + record, err := os.ReadFile(filepath.Join(".", "testdata", "single_record")) + require.NoError(t, err) + + compressedRecord, err := compression.Zip(record) + require.NoError(t, err) + records := [][]byte{compressedRecord} + + got, err := unmarshaler.Unmarshal(records) + require.NoError(t, err) + require.NotNil(t, got) + require.Equal(t, 1, got.ResourceLogs().Len()) + + rm := got.ResourceLogs().At(0) + require.Equal(t, 1, rm.ScopeLogs().Len()) + ilm := rm.ScopeLogs().At(0) + ilm.LogRecords().At(0).Timestamp() + expectedTimestamp := "2024-09-05 13:47:15.523 +0000 UTC" + require.Equal(t, expectedTimestamp, ilm.LogRecords().At(0).Timestamp().String()) +} diff --git a/receiver/awss3receiver/go.mod b/receiver/awss3receiver/go.mod index 5aa0552081ba..e09fb163d538 100644 --- a/receiver/awss3receiver/go.mod +++ b/receiver/awss3receiver/go.mod @@ -9,7 +9,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/s3 v1.67.1 github.com/open-telemetry/opamp-go v0.17.0 github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampcustommessages v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/receiver/awss3receiver/go.sum b/receiver/awss3receiver/go.sum index 7e458f7c378d..a96e1319c537 100644 --- a/receiver/awss3receiver/go.sum +++ b/receiver/awss3receiver/go.sum @@ -86,8 +86,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/receiver/awsxrayreceiver/go.mod b/receiver/awsxrayreceiver/go.mod index 88ad52fd36ca..6e6e3687f741 100644 --- a/receiver/awsxrayreceiver/go.mod +++ b/receiver/awsxrayreceiver/go.mod @@ -11,7 +11,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confignet v1.20.0 diff --git a/receiver/awsxrayreceiver/go.sum b/receiver/awsxrayreceiver/go.sum index 76244e162ff9..9d40e14ca090 100644 --- a/receiver/awsxrayreceiver/go.sum +++ b/receiver/awsxrayreceiver/go.sum @@ -58,8 +58,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/receiver/azureblobreceiver/go.mod b/receiver/azureblobreceiver/go.mod index 6773c6e5503a..b4af8478730c 100644 --- a/receiver/azureblobreceiver/go.mod +++ b/receiver/azureblobreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.8.0 github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.5.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configopaque v1.20.0 diff --git a/receiver/azureblobreceiver/go.sum b/receiver/azureblobreceiver/go.sum index cc8c637dbfd3..780efaa0d0f4 100644 --- a/receiver/azureblobreceiver/go.sum +++ b/receiver/azureblobreceiver/go.sum @@ -180,8 +180,8 @@ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/azureeventhubreceiver/go.mod b/receiver/azureeventhubreceiver/go.mod index d5c1d144fc09..4535296d0dd7 100644 --- a/receiver/azureeventhubreceiver/go.mod +++ b/receiver/azureeventhubreceiver/go.mod @@ -11,7 +11,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azurelogs v0.114.0 github.com/relvacode/iso8601 v1.5.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/receiver/azureeventhubreceiver/go.sum b/receiver/azureeventhubreceiver/go.sum index 960d4b666a2e..fbedbba14cd9 100644 --- a/receiver/azureeventhubreceiver/go.sum +++ b/receiver/azureeventhubreceiver/go.sum @@ -166,8 +166,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/azuremonitorreceiver/go.mod b/receiver/azuremonitorreceiver/go.mod index 9b58fdac64e5..50b61808ae63 100644 --- a/receiver/azuremonitorreceiver/go.mod +++ b/receiver/azuremonitorreceiver/go.mod @@ -10,7 +10,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/receiver/azuremonitorreceiver/go.sum b/receiver/azuremonitorreceiver/go.sum index b714b72fd753..58bfdf4df0f5 100644 --- a/receiver/azuremonitorreceiver/go.sum +++ b/receiver/azuremonitorreceiver/go.sum @@ -78,8 +78,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/receiver/bigipreceiver/go.mod b/receiver/bigipreceiver/go.mod index 700aefce6174..bde3f72e9ad2 100644 --- a/receiver/bigipreceiver/go.mod +++ b/receiver/bigipreceiver/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 diff --git a/receiver/bigipreceiver/go.sum b/receiver/bigipreceiver/go.sum index 76a2d75445f0..751030885ec7 100644 --- a/receiver/bigipreceiver/go.sum +++ b/receiver/bigipreceiver/go.sum @@ -126,8 +126,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/carbonreceiver/go.mod b/receiver/carbonreceiver/go.mod index a709b0bccea5..47e1ba56ef80 100644 --- a/receiver/carbonreceiver/go.mod +++ b/receiver/carbonreceiver/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/carbonreceiver/go.sum b/receiver/carbonreceiver/go.sum index 2d551cec0aaa..c33283143bb9 100644 --- a/receiver/carbonreceiver/go.sum +++ b/receiver/carbonreceiver/go.sum @@ -46,8 +46,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/receiver/chronyreceiver/go.mod b/receiver/chronyreceiver/go.mod index 41f348c0b3db..920747da736b 100644 --- a/receiver/chronyreceiver/go.mod +++ b/receiver/chronyreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/facebook/time v0.0.0-20240510113249-fa89cc575891 github.com/google/go-cmp v0.6.0 github.com/jonboulle/clockwork v0.4.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/receiver/chronyreceiver/go.sum b/receiver/chronyreceiver/go.sum index 0a4201fca8c4..9c7ecf5127e7 100644 --- a/receiver/chronyreceiver/go.sum +++ b/receiver/chronyreceiver/go.sum @@ -53,8 +53,8 @@ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/receiver/cloudflarereceiver/go.mod b/receiver/cloudflarereceiver/go.mod index 92c3f1d44fa1..2fc7fecb2c54 100644 --- a/receiver/cloudflarereceiver/go.mod +++ b/receiver/cloudflarereceiver/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/cloudflarereceiver/go.sum b/receiver/cloudflarereceiver/go.sum index e4d562cd2b38..4bd37e8ac0a5 100644 --- a/receiver/cloudflarereceiver/go.sum +++ b/receiver/cloudflarereceiver/go.sum @@ -50,8 +50,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/receiver/cloudfoundryreceiver/go.mod b/receiver/cloudfoundryreceiver/go.mod index 5b0857d17efc..44f9777bf305 100644 --- a/receiver/cloudfoundryreceiver/go.mod +++ b/receiver/cloudfoundryreceiver/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( code.cloudfoundry.org/go-loggregator v7.4.0+incompatible github.com/cloudfoundry-incubator/uaago v0.0.0-20190307164349-8136b7bbe76e - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/cloudfoundryreceiver/go.sum b/receiver/cloudfoundryreceiver/go.sum index fd7298e92921..e4b0bca72d68 100644 --- a/receiver/cloudfoundryreceiver/go.sum +++ b/receiver/cloudfoundryreceiver/go.sum @@ -98,8 +98,8 @@ github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/receiver/collectdreceiver/go.mod b/receiver/collectdreceiver/go.mod index 48cbf2850aae..e6cfb4b02820 100644 --- a/receiver/collectdreceiver/go.mod +++ b/receiver/collectdreceiver/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/collectdreceiver/go.sum b/receiver/collectdreceiver/go.sum index b397ea241c1b..bb41b5053aed 100644 --- a/receiver/collectdreceiver/go.sum +++ b/receiver/collectdreceiver/go.sum @@ -58,8 +58,8 @@ github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/receiver/couchdbreceiver/go.mod b/receiver/couchdbreceiver/go.mod index 878222b25e4b..c4f4659e160a 100644 --- a/receiver/couchdbreceiver/go.mod +++ b/receiver/couchdbreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 diff --git a/receiver/couchdbreceiver/go.sum b/receiver/couchdbreceiver/go.sum index 118fb4c51c28..12dd3f61393d 100644 --- a/receiver/couchdbreceiver/go.sum +++ b/receiver/couchdbreceiver/go.sum @@ -60,8 +60,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/receiver/datadogreceiver/go.mod b/receiver/datadogreceiver/go.mod index c6d6869cded5..6a0f49487a3a 100644 --- a/receiver/datadogreceiver/go.mod +++ b/receiver/datadogreceiver/go.mod @@ -12,7 +12,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/tinylib/msgp v1.2.4 github.com/vmihailenco/msgpack/v5 v5.4.1 go.opentelemetry.io/collector/component v0.114.0 diff --git a/receiver/datadogreceiver/go.sum b/receiver/datadogreceiver/go.sum index ba3bea7fc905..00c7951271fa 100644 --- a/receiver/datadogreceiver/go.sum +++ b/receiver/datadogreceiver/go.sum @@ -141,8 +141,8 @@ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tinylib/msgp v1.2.4 h1:yLFeUGostXXSGW5vxfT5dXG/qzkn4schv2I7at5+hVU= github.com/tinylib/msgp v1.2.4/go.mod h1:ykjzy2wzgrlvpDCRc4LA8UXy6D8bzMSuAF3WD57Gok0= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/dockerstatsreceiver/go.mod b/receiver/dockerstatsreceiver/go.mod index 844c9cde2ca2..b6075e2606be 100644 --- a/receiver/dockerstatsreceiver/go.mod +++ b/receiver/dockerstatsreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.34.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 diff --git a/receiver/dockerstatsreceiver/go.sum b/receiver/dockerstatsreceiver/go.sum index 56fa7ebf050f..515bb8420dfa 100644 --- a/receiver/dockerstatsreceiver/go.sum +++ b/receiver/dockerstatsreceiver/go.sum @@ -120,8 +120,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/elasticsearchreceiver/go.mod b/receiver/elasticsearchreceiver/go.mod index ede652a359d9..a34171b0aea4 100644 --- a/receiver/elasticsearchreceiver/go.mod +++ b/receiver/elasticsearchreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.34.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/elasticsearchreceiver/go.sum b/receiver/elasticsearchreceiver/go.sum index 1fda65858128..3d7b6a45f064 100644 --- a/receiver/elasticsearchreceiver/go.sum +++ b/receiver/elasticsearchreceiver/go.sum @@ -128,8 +128,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/expvarreceiver/go.mod b/receiver/expvarreceiver/go.mod index 140b75820e83..c46d0dc3eef9 100644 --- a/receiver/expvarreceiver/go.mod +++ b/receiver/expvarreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 diff --git a/receiver/expvarreceiver/go.sum b/receiver/expvarreceiver/go.sum index e673553f6d77..859812a4d221 100644 --- a/receiver/expvarreceiver/go.sum +++ b/receiver/expvarreceiver/go.sum @@ -58,8 +58,8 @@ github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/receiver/filelogreceiver/go.mod b/receiver/filelogreceiver/go.mod index f3ed12b805c2..53530040ecec 100644 --- a/receiver/filelogreceiver/go.mod +++ b/receiver/filelogreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 go.opentelemetry.io/collector/consumer v0.114.0 // indirect diff --git a/receiver/filelogreceiver/go.sum b/receiver/filelogreceiver/go.sum index bbc1355e7f3e..9c158dd9cdb3 100644 --- a/receiver/filelogreceiver/go.sum +++ b/receiver/filelogreceiver/go.sum @@ -69,8 +69,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/filestatsreceiver/go.mod b/receiver/filestatsreceiver/go.mod index b267fbf55bff..4e8bb0722389 100644 --- a/receiver/filestatsreceiver/go.mod +++ b/receiver/filestatsreceiver/go.mod @@ -7,7 +7,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/receiver/filestatsreceiver/go.sum b/receiver/filestatsreceiver/go.sum index ad19ccb1e729..875847594e18 100644 --- a/receiver/filestatsreceiver/go.sum +++ b/receiver/filestatsreceiver/go.sum @@ -120,8 +120,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/flinkmetricsreceiver/go.mod b/receiver/flinkmetricsreceiver/go.mod index f556c825f4fd..918f53822321 100644 --- a/receiver/flinkmetricsreceiver/go.mod +++ b/receiver/flinkmetricsreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 diff --git a/receiver/flinkmetricsreceiver/go.sum b/receiver/flinkmetricsreceiver/go.sum index 118fb4c51c28..12dd3f61393d 100644 --- a/receiver/flinkmetricsreceiver/go.sum +++ b/receiver/flinkmetricsreceiver/go.sum @@ -60,8 +60,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/receiver/fluentforwardreceiver/go.mod b/receiver/fluentforwardreceiver/go.mod index e0e831789321..fad915a31967 100644 --- a/receiver/fluentforwardreceiver/go.mod +++ b/receiver/fluentforwardreceiver/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/tinylib/msgp v1.2.4 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/fluentforwardreceiver/go.sum b/receiver/fluentforwardreceiver/go.sum index e44f2ae75d3d..4334354b4716 100644 --- a/receiver/fluentforwardreceiver/go.sum +++ b/receiver/fluentforwardreceiver/go.sum @@ -48,8 +48,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tinylib/msgp v1.2.4 h1:yLFeUGostXXSGW5vxfT5dXG/qzkn4schv2I7at5+hVU= github.com/tinylib/msgp v1.2.4/go.mod h1:ykjzy2wzgrlvpDCRc4LA8UXy6D8bzMSuAF3WD57Gok0= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/receiver/githubreceiver/go.mod b/receiver/githubreceiver/go.mod index 9676e18a9dd3..a3d4277d3517 100644 --- a/receiver/githubreceiver/go.mod +++ b/receiver/githubreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/google/go-github/v66 v66.0.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 diff --git a/receiver/githubreceiver/go.sum b/receiver/githubreceiver/go.sum index 809233c80168..55fe2bf3b55b 100644 --- a/receiver/githubreceiver/go.sum +++ b/receiver/githubreceiver/go.sum @@ -108,8 +108,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tklauser/go-sysconf v0.3.13 h1:GBUpcahXSpR2xN01jhkNAbTLRk2Yzgggk8IM08lq3r4= github.com/tklauser/go-sysconf v0.3.13/go.mod h1:zwleP4Q4OehZHGn4CYZDipCgg9usW5IJePewFCGVEa0= github.com/tklauser/numcpus v0.7.0 h1:yjuerZP127QG9m5Zh/mSO4wqurYil27tHrqwRoRjpr4= diff --git a/receiver/googlecloudmonitoringreceiver/go.mod b/receiver/googlecloudmonitoringreceiver/go.mod index c6233929c717..af8c8ef50d11 100644 --- a/receiver/googlecloudmonitoringreceiver/go.mod +++ b/receiver/googlecloudmonitoringreceiver/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/google go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/receiver/googlecloudmonitoringreceiver/go.sum b/receiver/googlecloudmonitoringreceiver/go.sum index e35561d98e7f..8bb322a9af62 100644 --- a/receiver/googlecloudmonitoringreceiver/go.sum +++ b/receiver/googlecloudmonitoringreceiver/go.sum @@ -98,8 +98,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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/googlecloudpubsubreceiver/go.mod b/receiver/googlecloudpubsubreceiver/go.mod index eb2b9031c08a..d19739a9ab78 100644 --- a/receiver/googlecloudpubsubreceiver/go.mod +++ b/receiver/googlecloudpubsubreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/iancoleman/strcase v0.3.0 github.com/json-iterator/go v1.1.12 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/receiver/googlecloudpubsubreceiver/go.sum b/receiver/googlecloudpubsubreceiver/go.sum index 56fb762a760a..2b3c863a4f28 100644 --- a/receiver/googlecloudpubsubreceiver/go.sum +++ b/receiver/googlecloudpubsubreceiver/go.sum @@ -110,8 +110,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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.einride.tech/aip v0.68.0 h1:4seM66oLzTpz50u4K1zlJyOXQ3tCzcJN7I22tKkjipw= diff --git a/receiver/googlecloudspannerreceiver/go.mod b/receiver/googlecloudspannerreceiver/go.mod index fd2aff77c550..ab19942bbe0f 100644 --- a/receiver/googlecloudspannerreceiver/go.mod +++ b/receiver/googlecloudspannerreceiver/go.mod @@ -6,7 +6,7 @@ require ( cloud.google.com/go/spanner v1.70.0 github.com/ReneKroon/ttlcache/v2 v2.11.0 github.com/mitchellh/hashstructure v1.1.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/receiver/googlecloudspannerreceiver/go.sum b/receiver/googlecloudspannerreceiver/go.sum index 495cbdd5efe2..e993f559a74c 100644 --- a/receiver/googlecloudspannerreceiver/go.sum +++ b/receiver/googlecloudspannerreceiver/go.sum @@ -924,8 +924,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ 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.3/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/haproxyreceiver/go.mod b/receiver/haproxyreceiver/go.mod index ff2fbbc803e5..cd5e605ec435 100644 --- a/receiver/haproxyreceiver/go.mod +++ b/receiver/haproxyreceiver/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.34.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/haproxyreceiver/go.sum b/receiver/haproxyreceiver/go.sum index 76a2d75445f0..751030885ec7 100644 --- a/receiver/haproxyreceiver/go.sum +++ b/receiver/haproxyreceiver/go.sum @@ -126,8 +126,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/hostmetricsreceiver/go.mod b/receiver/hostmetricsreceiver/go.mod index 2bc4b37bc4c9..09f39f5472b8 100644 --- a/receiver/hostmetricsreceiver/go.mod +++ b/receiver/hostmetricsreceiver/go.mod @@ -11,7 +11,7 @@ require ( github.com/prometheus-community/windows_exporter v0.27.2 github.com/prometheus/procfs v0.15.1 github.com/shirou/gopsutil/v4 v4.24.10 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/yusufpapurcu/wmi v1.2.4 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/hostmetricsreceiver/go.sum b/receiver/hostmetricsreceiver/go.sum index fd9a7df266e8..dac3d6d85064 100644 --- a/receiver/hostmetricsreceiver/go.sum +++ b/receiver/hostmetricsreceiver/go.sum @@ -163,8 +163,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/hostmetricsreceiver/hostmetrics_receiver_test.go b/receiver/hostmetricsreceiver/hostmetrics_receiver_test.go index 43bc911c8e65..ce1cff1a5cfd 100644 --- a/receiver/hostmetricsreceiver/hostmetrics_receiver_test.go +++ b/receiver/hostmetricsreceiver/hostmetrics_receiver_test.go @@ -12,9 +12,7 @@ import ( "github.com/shirou/gopsutil/v4/common" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" @@ -222,22 +220,11 @@ func (m *mockConfig) SetRootPath(_ string) {} func (m *mockConfig) SetEnvMap(_ common.EnvMap) {} -type ( - mockFactory struct{ mock.Mock } - mockScraper struct{ mock.Mock } -) - -func (m *mockFactory) CreateDefaultConfig() internal.Config { return &mockConfig{} } -func (m *mockFactory) CreateMetricsScraper(context.Context, receiver.Settings, internal.Config) (scraperhelper.Scraper, error) { - args := m.MethodCalled("CreateMetricsScraper") - return args.Get(0).(scraperhelper.Scraper), args.Error(1) -} +type errFactory struct{} -func (m *mockScraper) ID() component.ID { return component.MustNewID("mock_scraper") } -func (m *mockScraper) Start(context.Context, component.Host) error { return nil } -func (m *mockScraper) Shutdown(context.Context) error { return nil } -func (m *mockScraper) Scrape(context.Context) (pmetric.Metrics, error) { - return pmetric.NewMetrics(), errors.New("err1") +func (m *errFactory) CreateDefaultConfig() internal.Config { return &mockConfig{} } +func (m *errFactory) CreateMetricsScraper(context.Context, receiver.Settings, internal.Config) (scraperhelper.Scraper, error) { + return nil, errors.New("err1") } func TestGatherMetrics_ScraperKeyConfigError(t *testing.T) { @@ -254,8 +241,7 @@ func TestGatherMetrics_ScraperKeyConfigError(t *testing.T) { } func TestGatherMetrics_CreateMetricsScraperError(t *testing.T) { - mFactory := &mockFactory{} - mFactory.On("CreateMetricsScraper").Return(&mockScraper{}, errors.New("err1")) + mFactory := &errFactory{} tmp := scraperFactories scraperFactories = map[string]internal.ScraperFactory{mockTypeStr: mFactory} defer func() { diff --git a/receiver/httpcheckreceiver/go.mod b/receiver/httpcheckreceiver/go.mod index 791a5510672b..785228320d89 100644 --- a/receiver/httpcheckreceiver/go.mod +++ b/receiver/httpcheckreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 diff --git a/receiver/httpcheckreceiver/go.sum b/receiver/httpcheckreceiver/go.sum index e673553f6d77..859812a4d221 100644 --- a/receiver/httpcheckreceiver/go.sum +++ b/receiver/httpcheckreceiver/go.sum @@ -58,8 +58,8 @@ github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/receiver/huaweicloudcesreceiver/Makefile b/receiver/huaweicloudcesreceiver/Makefile new file mode 100644 index 000000000000..c1496226e590 --- /dev/null +++ b/receiver/huaweicloudcesreceiver/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common \ No newline at end of file diff --git a/receiver/huaweicloudcesreceiver/README.md b/receiver/huaweicloudcesreceiver/README.md new file mode 100644 index 000000000000..9761bb06ba00 --- /dev/null +++ b/receiver/huaweicloudcesreceiver/README.md @@ -0,0 +1,267 @@ +# Huawei Cloud CES Receiver + + +| Status | | +| ------------- |-----------| +| Stability | [development]: metrics | +| Distributions | [] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Fhuaweicloudces%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Fhuaweicloudces) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Fhuaweicloudces%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Fhuaweicloudces) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@heitorganzeli](https://www.github.com/heitorganzeli), [@narcis96](https://www.github.com/narcis96), [@mwear](https://www.github.com/mwear) | + +[development]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#development + + +This receiver contains the implementation of the Huawei Cloud [Cloud Eye Service](https://www.huaweicloud.com/intl/en-us/product/ces.html) (CES) receiver for the OpenTelemetry Collector. The receiver collects metrics from Huawei Cloud's CES service and sends them to the OpenTelemetry Collector for processing and exporting. + +## Configuration + +The following settings are required: + +- `region_id`: The ID of the Huawei Cloud region from which metrics are collected. For example, `eu-west-101`. The full list of the available regions can be found [here](https://pkg.go.dev/github.com/huaweicloud/huaweicloud-sdk-go-v3@v0.1.104/services/ces/v1/region). + +- `project_id`: The ID of the project in Huawei Cloud. This is used to identify which project's metrics are to be collected. See [Obtaining a Project ID](https://support.huaweicloud.com/intl/en-us/devg-apisign/api-sign-provide-proid.html). + +- `period`: The aggregation granularity of metrics retrieved from CES in seconds. For details about the aggregation, see [What Is Rollup?](https://support.huaweicloud.com/intl/en-us/ces_faq/ces_faq_0009.html). Possible values are 1, 300, 1200, 3600, 14400, and 86400. + - 1: Cloud Eye performs no aggregation and displays raw data. + - 300: Cloud Eye aggregates data every 5 minutes. + - 1200: Cloud Eye aggregates data every 20 minutes. + - 3600: Cloud Eye aggregates data every hour. + - 14400: Cloud Eye aggregates data every 4 hours. + - 86400: Cloud Eye aggregates data every 24 hours. +- `filter`: The filter field determines the aggregation method used for the metrics. This aggregation is applied to the data points within the specified period. Valid values for filter include: + + - `average`: Calculates the average value over the period. + - `min`: Retrieves the minimum value within the period. + - `max`: Retrieves the maximum value within the period. + - `sum`: Computes the sum of all data points within the period. + - `variance`: Calculates the variance (square of the standard deviation) for the data points. + +- `no_verify_ssl`: A boolean flag indicating whether SSL verification should be disabled. Set to True to disable SSL verification. + +- `access_key`: The access key needed for CES authentification. Check `Huawei Cloud SDK Authentication Setup` section for more details. + +- `secret_key`: The secret key needed for CES authentification. Check `Huawei Cloud SDK Authentication Setup` section for more details. + +The following settings are optional: + +- `initial_delay`: The delay before the first collection of metrics begins. This is a duration field, such as 5s for 5 seconds. + +- `collection_interval` (default = `60s`): This is the interval at which this receiver collects metrics. This value must be a string readable by Golang's [time.ParseDuration](https://pkg.go.dev/time#ParseDuration). Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`. We recommend a polling interval of at least one minute. + +- `retry_on_failure`: The following configurations can be used to control the retry policy of the CES client. The default values are suitable for most deployment scenarios. + - `enabled` (default true) + - `initial_interval` (default 100ms) + - `max_interval` (default 1s) + - `max_elapsed_time` (default 15s) + - `randomization_factor` (default 0.5) + - `multiplier` (default 1.5) + +### Example Configuration + +```yaml +receivers: + huaweicloudcesreceiver: + collection_interval: 3h + initial_delay: 5s + region_id: eu-west-101 + access_key: ${env:HUAWEICLOUD_SDK_AK} + secret_key: ${env:HUAWEICLOUD_SDK_SK} + project_id: "project_1" + period: 300 + filter: average + no_verify_ssl: True +``` + +The full list of settings exposed for this receiver are documented [here](./config.go). + +### Huawei Cloud SDK Authentication Setup + + +To ensure secure authentication, the Access Key (AK) and Secret Key (SK) used by the Huawei Cloud SDK must be stored in environment variables. See [Obtaining an AK/SK](https://support.huaweicloud.com/intl/en-us/devg-apisign/api-sign-provide-aksk.html). + +Before running the application, you need to set the environment variables `HUAWEICLOUD_SDK_AK` and `HUAWEICLOUD_SDK_SK` in your local environment. Here’s how you can do it: + +1. Open your terminal. +2. Set the environment variables by executing the following commands: + + ```sh + export HUAWEICLOUD_SDK_AK=your-access-key + export HUAWEICLOUD_SDK_SK=your-secret-key + ``` + +3. Verify that the variables are set correctly: + + ```sh + echo $HUAWEICLOUD_SDK_AK + echo $HUAWEICLOUD_SDK_SK + ``` + +## Error handling +If you encounter any errors, please refer to: +- [Huawei Cloud Error Codes](https://support.huaweicloud.com/intl/en-us/devg-apisign/api-sign-errorcode.html) +- [CES Error Codes](https://support.huaweicloud.com/intl/en-us/api-ces/ErrorCode.html) +- [Quota management](https://support.huaweicloud.com/intl/en-us/usermanual-ces/en-us_topic_0154940152.html) + + +## Converting CES metric representation to Open Telementery metric representation + + +| Source Field | Target Field | Description | +|--------------------------|----------------------------------------------|-------------------------------------------------------------------------------------------------------| +| **metric_name** | `scoped_metric.metric.name` | The name of the metric. | +| **unit** | `scoped_metric.metric.unit` | The unit of the metric, e.g., `%`, `bit/s`. | +| **datapoints.value** | `scoped_metric.metric.gauge.data_points.value` | The value of the metric at the specified timestamp. | +| **datapoints.timestamp** | `scoped_metric.metric.gauge.data_points.timestamp` | The timestamp of the metric in nanoseconds. Converted from milliseconds by multiplying by 1,000,000. | +| **dimensions.name** | `key of scoped_metric.metric.metadata` | The dimension name stored as an attribute. | +| **dimensions.value** | `value of scoped_metric.metric.metadata` | The dimension value stored as an attribute. | +| **Receiver Config** | `resource.attributes["project.id"]` | The project ID used in the configuration file of the receiver. | +| **Receiver Config** | `resource.attributes["region.id"]` | The region ID used in the configuration file of the receiver. | +| **namespace** | `resource.attributes["service.namespace"]` | The namespace of the metric, e.g., `SYS.VPC`, stored as an attribute with the key `service.namespace`. | +| *N/A* | `resource.attributes["cloud.provider"]` | Set to `"huawei_cloud"` as the cloud provider. | +| *N/A* | `scoped_metric.scope.name` | Set to `"huawei_cloud_ces"` as the scope name. | +| *N/A* | `scoped_metric.scope.version` | Set to `"v1"` as the scope version. | + | + +### Notes + +- The `timestamp` field in the source is converted from milliseconds to nanoseconds in the target field. +- Some fields are added in the target format with constant values to provide additional context and metadata. + +### Example: + +```json +[ + { + "unit": "%", + "datapoints": [ + { "average": 10, "timestamp": 1722580500000 }, + { "average": 20, "timestamp": 1722580800000 } + ], + "namespace": "SYS.ECS", + "metric_name": "cpu_util", + "dimensions": [ + { + "name": "instance_id", + "value": "faea5b75-e390-4e2b-8733-9226a9026070" + } + ] + }, + { + "unit": "%", + "datapoints": [ + { "average": 30, "timestamp": 1722580500000 }, + { "average": 40, "timestamp": 1722580800000 } + ], + "namespace": "SYS.ECS", + "metric_name": "mem_util", + "dimensions": [ + { + "name": "instance_id", + "value": "abcea5b75-e390-4e2b-8733-9226a9026070" + } + ] + }, + { + "unit": "bit/s", + "datapoints": [ + { "average": 1024, "timestamp": 1722580500000}, + { "average": 2048, "timestamp": 1722580800000} + ], + "namespace": "SYS.VPC", + "metric_name": "upstream_bandwidth_usage", + "dimensions": [ + { + "name": "publicip_id", + "value": "test-baae-4dd9-ad3f-1234" + } + ] + } +] +``` + +converts to + +```json +{ + "resourceMetrics": [ + { + "resource": { + "attributes": { + "cloud.provider": "huawei_cloud", + "project.id": "project_1", + "region.id": "eu-west-101", + "system.namespace": "SYS.ECS", + } + }, + "scopeMetrics": [ + { + "scope": { "name": "huawei_cloud_ces", "version": "v1" }, + "metrics": [ + { + "name": "cpu_util", + "unit": "%", + "gauge": { + "dataPoints": [ + { "timeUnixNano": "1722580500000000000", "asDouble": 10 }, + { "timeUnixNano": "1722580800000000000", "asDouble": 20 } + ] + }, + "metadata": { + "instance_id": "faea5b75-e390-4e2b-8733-9226a9026070", + } + } + ] + }, + { + "scope": { "name": "huawei_cloud_ces", "version": "v1" }, + "metrics": [ + { + "name": "mem_util", + "unit": "%", + "gauge": { + "dataPoints": [ + { "timeUnixNano": "1722580500000000000", "asDouble": 30 }, + { "timeUnixNano": "1722580800000000000", "asDouble": 40 } + ] + }, + "metadata": { + "instance_id": "abcea5b75-e390-4e2b-8733-9226a9026070", + } + } + ] + } + ] + }, + { + "resource": { + "attributes": { + "cloud.provider": "huawei_cloud", + "project.id": "project_1", + "region.id": "eu-west-101", + "system.namespace": "SYS.VPC", + } + }, + "scopeMetrics": [ + { + "scope": { "name": "huawei_cloud_ces", "version": "v1" }, + "metrics": [ + { + "name": "upstream_bandwidth_usage", + "unit": "bits/s", + "gauge": { + "dataPoints": [ + { "timeUnixNano": "1722580500000000000", "asDouble": 1024 }, + { "timeUnixNano": "1722580800000000000", "asDouble": 2048 } + ] + }, + "metadata": { + "publicip_id": "test-baae-4dd9-ad3f-1234", + } + } + ] + } + ] + } + ] +} +``` \ No newline at end of file diff --git a/receiver/huaweicloudcesreceiver/config.go b/receiver/huaweicloudcesreceiver/config.go new file mode 100644 index 000000000000..a4a356c0e914 --- /dev/null +++ b/receiver/huaweicloudcesreceiver/config.go @@ -0,0 +1,65 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package huaweicloudcesreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/huaweicloudcesreceiver" + +import ( + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configopaque" + "go.opentelemetry.io/collector/config/configretry" + "go.opentelemetry.io/collector/receiver/scraperhelper" +) + +// Config represent a configuration for the CloudWatch logs exporter. +type Config struct { + scraperhelper.ControllerConfig `mapstructure:",squash"` + confighttp.ClientConfig `mapstructure:",squash"` + // Nodes defines the nodes to scrape. + // See https://www.elastic.co/guide/en/elasticsearch/reference/7.9/cluster.html#cluster-nodes for which selectors may be used here. + // If Nodes is empty, no nodes will be scraped. + Nodes []string `mapstructure:"nodes"` + // SkipClusterMetrics indicates whether cluster level metrics from /_cluster/* endpoints should be scraped or not. + SkipClusterMetrics bool `mapstructure:"skip_cluster_metrics"` + // Indices defines the indices to scrape. + // See https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html#index-stats-api-path-params + // for which names are viable. + // If Indices is empty, no indices will be scraped. + Indices []string `mapstructure:"indices"` + // Set of attributes used to configure huawei's CES SDK connection + huaweiSessionConfig `mapstructure:",squash"` + + // ProjectID is a string to reference project where metrics should be associated with. + // If ProjectID is not filled in, the SDK will automatically call the IAM service to query the project id corresponding to the region. + ProjectID string `mapstructure:"project_id"` + + // RegionID is the ID of the CES region. + RegionID string `mapstructure:"region_id"` + + // How retrieved data from Cloud Eye is aggregated. + // Possible values are 1, 300, 1200, 3600, 14400, and 86400. + // 1: Cloud Eye performs no aggregation and displays raw data. + // 300: Cloud Eye aggregates data every 5 minutes. + // 1200: Cloud Eye aggregates data every 20 minutes. + // 3600: Cloud Eye aggregates data every hour. + // 14400: Cloud Eye aggregates data every 4 hours. + // 86400: Cloud Eye aggregates data every 24 hours. + // For details about the aggregation, see https://support.huaweicloud.com/intl/en-us/ces_faq/ces_faq_0009.html + Period int32 `mapstructure:"period"` + + // Data aggregation method. The supported values ​​are max, min, average, sum, variance. + Filter string `mapstructure:"filter"` + + BackOffConfig configretry.BackOffConfig `mapstructure:"retry_on_failure"` +} + +type huaweiSessionConfig struct { + AccessKey configopaque.String `mapstructure:"access_key"` + + SecretKey configopaque.String `mapstructure:"secret_key"` + // Number of seconds before timing out a request. + NoVerifySSL bool `mapstructure:"no_verify_ssl"` + // Upload segments to AWS X-Ray through a proxy. + ProxyAddress string `mapstructure:"proxy_address"` + ProxyUser string `mapstructure:"proxy_user"` + ProxyPassword string `mapstructure:"proxy_password"` +} diff --git a/receiver/huaweicloudcesreceiver/doc.go b/receiver/huaweicloudcesreceiver/doc.go new file mode 100644 index 000000000000..592165c39c40 --- /dev/null +++ b/receiver/huaweicloudcesreceiver/doc.go @@ -0,0 +1,6 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml + +package huaweicloudcesreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/huaweicloudcesreceiver" diff --git a/receiver/huaweicloudcesreceiver/factory.go b/receiver/huaweicloudcesreceiver/factory.go new file mode 100644 index 000000000000..63ed4582a84c --- /dev/null +++ b/receiver/huaweicloudcesreceiver/factory.go @@ -0,0 +1,49 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package huaweicloudcesreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/huaweicloudcesreceiver" + +import ( + "context" + "time" + + "github.com/cenkalti/backoff/v4" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configretry" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/receiver" + + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/huaweicloudcesreceiver/internal/metadata" +) + +func NewFactory() receiver.Factory { + return receiver.NewFactory( + metadata.Type, + createDefaultConfig, + receiver.WithMetrics(createMetricsReceiver, metadata.MetricsStability)) +} + +func createDefaultConfig() component.Config { + return &Config{ + BackOffConfig: configretry.BackOffConfig{ + Enabled: true, + InitialInterval: 100 * time.Millisecond, + MaxInterval: time.Second, + MaxElapsedTime: 15 * time.Second, + RandomizationFactor: backoff.DefaultRandomizationFactor, + Multiplier: backoff.DefaultMultiplier, + }, + huaweiSessionConfig: huaweiSessionConfig{ + NoVerifySSL: false, + }, + } +} + +func createMetricsReceiver( + _ context.Context, + _ receiver.Settings, + _ component.Config, + _ consumer.Metrics, +) (receiver.Metrics, error) { + return nil, nil +} diff --git a/receiver/huaweicloudcesreceiver/generated_component_test.go b/receiver/huaweicloudcesreceiver/generated_component_test.go new file mode 100644 index 000000000000..fe2e215838d4 --- /dev/null +++ b/receiver/huaweicloudcesreceiver/generated_component_test.go @@ -0,0 +1,18 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package huaweicloudcesreceiver + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" +) + +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "huaweicloudcesreceiver", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) +} diff --git a/receiver/huaweicloudcesreceiver/generated_package_test.go b/receiver/huaweicloudcesreceiver/generated_package_test.go new file mode 100644 index 000000000000..e3abd7c8e13f --- /dev/null +++ b/receiver/huaweicloudcesreceiver/generated_package_test.go @@ -0,0 +1,13 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package huaweicloudcesreceiver + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/receiver/huaweicloudcesreceiver/go.mod b/receiver/huaweicloudcesreceiver/go.mod new file mode 100644 index 000000000000..5e3824c1aa7f --- /dev/null +++ b/receiver/huaweicloudcesreceiver/go.mod @@ -0,0 +1,59 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/huaweicloudcesreceiver + +go 1.22.7 + +require ( + github.com/cenkalti/backoff/v4 v4.3.0 + github.com/stretchr/testify v1.10.0 + go.opentelemetry.io/collector/component v0.114.0 + go.opentelemetry.io/collector/component/componenttest v0.114.0 + go.opentelemetry.io/collector/config/confighttp v0.114.0 + go.opentelemetry.io/collector/config/configopaque v1.20.0 + go.opentelemetry.io/collector/config/configretry v1.20.0 + go.opentelemetry.io/collector/consumer v0.114.0 + go.opentelemetry.io/collector/receiver v0.114.0 + go.uber.org/goleak v1.3.0 +) + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.8.0 // indirect + github.com/go-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/compress v1.17.11 // 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/v4 v4.1.21 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/rs/cors v1.11.1 // indirect + go.opentelemetry.io/collector/client v1.20.0 // indirect + go.opentelemetry.io/collector/config/configauth v0.114.0 // indirect + go.opentelemetry.io/collector/config/configcompression v1.20.0 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.114.0 // indirect + go.opentelemetry.io/collector/config/configtls v1.20.0 // indirect + go.opentelemetry.io/collector/config/internal v0.114.0 // indirect + go.opentelemetry.io/collector/extension v0.114.0 // indirect + go.opentelemetry.io/collector/extension/auth v0.114.0 // indirect + go.opentelemetry.io/collector/pdata v1.20.0 // indirect + go.opentelemetry.io/collector/pipeline v0.114.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0 // indirect + go.opentelemetry.io/otel v1.32.0 // indirect + go.opentelemetry.io/otel/metric v1.32.0 // indirect + go.opentelemetry.io/otel/sdk v1.32.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.32.0 // indirect + go.opentelemetry.io/otel/trace v1.32.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + go.uber.org/zap v1.27.0 // indirect + golang.org/x/net v0.31.0 // indirect + golang.org/x/sys v0.27.0 // indirect + golang.org/x/text v0.20.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20241118233622-e639e219e697 // indirect + google.golang.org/grpc v1.68.0 // indirect + google.golang.org/protobuf v1.35.2 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/receiver/huaweicloudcesreceiver/go.sum b/receiver/huaweicloudcesreceiver/go.sum new file mode 100644 index 000000000000..5d2662074ffd --- /dev/null +++ b/receiver/huaweicloudcesreceiver/go.sum @@ -0,0 +1,160 @@ +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.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.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= +github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/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.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.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/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc= +github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0= +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/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 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +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.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= +github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +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.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= +go.opentelemetry.io/collector/client v1.20.0/go.mod h1:6aqkszco9FaLWCxyJEVam6PP7cUa8mPRIXeS5eZGj0U= +go.opentelemetry.io/collector/component v0.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= +go.opentelemetry.io/collector/component v0.114.0/go.mod h1:MLxtjZ6UVHjDxSdhGLuJfHBHvfl1iT/Y7IaQPD24Eww= +go.opentelemetry.io/collector/component/componenttest v0.114.0 h1:GM4FTTlfeXoVm6sZYBHImwlRN8ayh2oAfUhvaFj7Zo8= +go.opentelemetry.io/collector/component/componenttest v0.114.0/go.mod h1:ZZEJMtbJtoVC/3/9R1HzERq+cYQRxuMFQrPCpfZ4Xos= +go.opentelemetry.io/collector/config/configauth v0.114.0 h1:R2sJ6xpsLYGH0yU0vCxotzBYDKR/Hrjv0A7y9lwMyiw= +go.opentelemetry.io/collector/config/configauth v0.114.0/go.mod h1:3Z24KcCpG+WYCeQYfs/cNp5cP2BDeOqLCtOEgs/rPqM= +go.opentelemetry.io/collector/config/configcompression v1.20.0 h1:H/mvz7J/5z+O74YsO0t2tk+REnO2tzLM8TgIQ4AZ5w0= +go.opentelemetry.io/collector/config/configcompression v1.20.0/go.mod h1:pnxkFCLUZLKWzYJvfSwZnPrnm0twX14CYj2ADth5xiU= +go.opentelemetry.io/collector/config/confighttp v0.114.0 h1:DjGsBvVm+mGK3IpJBaXianWhwcxEC1fF33cpuC1LY/I= +go.opentelemetry.io/collector/config/confighttp v0.114.0/go.mod h1:nrlNLxOZ+4JQaV9j0TiqQV7LOHhrRivPrT8nQRHED3Q= +go.opentelemetry.io/collector/config/configopaque v1.20.0 h1:2I48zKiyyyYqjm7y0B9OLp24ku2ZSX3nCHG0r5FdWOQ= +go.opentelemetry.io/collector/config/configopaque v1.20.0/go.mod h1:6zlLIyOoRpJJ+0bEKrlZOZon3rOp5Jrz9fMdR4twOS4= +go.opentelemetry.io/collector/config/configretry v1.20.0 h1:z679mrMlW2a6tOOYPGdrS/QfALxdzWLQUOpH8Uu+D5Y= +go.opentelemetry.io/collector/config/configretry v1.20.0/go.mod h1:KvQF5cfphq1rQm1dKR4eLDNQYw6iI2fY72NMZVa+0N0= +go.opentelemetry.io/collector/config/configtelemetry v0.114.0 h1:kjLeyrumge6wsX6ZIkicdNOlBXaEyW2PI2ZdVXz/rzY= +go.opentelemetry.io/collector/config/configtelemetry v0.114.0/go.mod h1:R0MBUxjSMVMIhljuDHWIygzzJWQyZHXXWIgQNxcFwhc= +go.opentelemetry.io/collector/config/configtls v1.20.0 h1:hNlJdwfyY5Qe54RLJ41lfLqKTn9ypkR7sk7JNCcSe2U= +go.opentelemetry.io/collector/config/configtls v1.20.0/go.mod h1:sav/txSHguadTYlSSK+BJO2ljJeYEtRoBahgzWAguYg= +go.opentelemetry.io/collector/config/internal v0.114.0 h1:uWSDWTJb8T6xRjKD9/XmEARakXnxgYVYKUeId78hErc= +go.opentelemetry.io/collector/config/internal v0.114.0/go.mod h1:yC7E4h1Uj0SubxcFImh6OvBHFTjMh99+A5PuyIgDWqc= +go.opentelemetry.io/collector/consumer v0.114.0 h1:1zVaHvfIZowGwZRitRBRo3i+RP2StlU+GClYiofSw0Q= +go.opentelemetry.io/collector/consumer v0.114.0/go.mod h1:d+Mrzt9hsH1ub3zmwSlnQVPLeTYir4Mgo7CrWfnncN4= +go.opentelemetry.io/collector/consumer/consumererror v0.114.0 h1:r2YiELfWerb40FHD23V04gNjIkLUcjEKGxI4Vtm2iO4= +go.opentelemetry.io/collector/consumer/consumererror v0.114.0/go.mod h1:MzIrLQ5jptO2egypolhlAbZsWZr29WC4FhSxQjnxcvg= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.114.0 h1:5pXYy3E6UK5Huu3aQbsYL8B6E6MyWx4fvXXDn+oXZaA= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.114.0/go.mod h1:PMq3f54KcJQO4v1tue0QxQScu7REFVADlXxXSAYMiN0= +go.opentelemetry.io/collector/consumer/consumertest v0.114.0 h1:isaTwJK5DOy8Bs7GuLq23ejfgj8gLIo5dOUvkRnLF4g= +go.opentelemetry.io/collector/consumer/consumertest v0.114.0/go.mod h1:GNeLPkfRPdh06n/Rv1UKa/cAtCKjN0a7ADyHjIj4HFE= +go.opentelemetry.io/collector/extension v0.114.0 h1:9Qb92y8hD2WDC5aMDoj4JNQN+/5BQYJWPUPzLXX+iGw= +go.opentelemetry.io/collector/extension v0.114.0/go.mod h1:Yk2/1ptVgfTr12t+22v93nYJpioP14pURv2YercSzU0= +go.opentelemetry.io/collector/extension/auth v0.114.0 h1:1K2qh4yvG8kKR/sTAobI/rw5VxzPZoKcl3FmC195vvo= +go.opentelemetry.io/collector/extension/auth v0.114.0/go.mod h1:IjtsG+jUVJB0utKF8dAK8pLutRun3aEgASshImzsw/U= +go.opentelemetry.io/collector/pdata v1.20.0 h1:ePcwt4bdtISP0loHaE+C9xYoU2ZkIvWv89Fob16o9SM= +go.opentelemetry.io/collector/pdata v1.20.0/go.mod h1:Ox1YVLe87cZDB/TL30i4SUz1cA5s6AM6SpFMfY61ICs= +go.opentelemetry.io/collector/pdata/pprofile v0.114.0 h1:pUNfTzsI/JUTiE+DScDM4lsrPoxnVNLI2fbTxR/oapo= +go.opentelemetry.io/collector/pdata/pprofile v0.114.0/go.mod h1:4aNcj6WM1n1uXyFSXlhVs4ibrERgNYsTbzcYI2zGhxA= +go.opentelemetry.io/collector/pipeline v0.114.0 h1:v3YOhc5z0tD6QbO5n/pnftpIeroihM2ks9Z2yKPCcwY= +go.opentelemetry.io/collector/pipeline v0.114.0/go.mod h1:4vOvjVsoYTHVGTbfFwqfnQOSV2K3RKUHofh3jNRc2Mg= +go.opentelemetry.io/collector/receiver v0.114.0 h1:90SAnXAjNq7/k52/pFmmb06Cf1YauoPYtbio4aOXafY= +go.opentelemetry.io/collector/receiver v0.114.0/go.mod h1:KUGT0/D953LXbGH/D3lLPU8yrU3HfWnUqpt4W4hSOnE= +go.opentelemetry.io/collector/receiver/receiverprofiles v0.114.0 h1:ibhEfGpvNB3yrtpl2jYFabrunMk1hurxvMYpM0b1Ck4= +go.opentelemetry.io/collector/receiver/receiverprofiles v0.114.0/go.mod h1:UZyRfaasw+NLvN10AN8IQnmj5tQ3BOUH1uP2ctpO9f0= +go.opentelemetry.io/collector/receiver/receivertest v0.114.0 h1:D+Kh9t2n4asTnM+TiSxbrKlUemLZandWntj17BJWWb0= +go.opentelemetry.io/collector/receiver/receivertest v0.114.0/go.mod h1:mNSHQ13vFmqD+VAcRzLjStFBejbcWUn2Mp0pAd7Op+U= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0 h1:DheMAlT6POBP+gh8RUH19EOTnQIor5QE0uSRPtzCpSw= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.57.0/go.mod h1:wZcGmeVO9nzP67aYSLDqXNWK87EZWhi7JWj1v7ZXf94= +go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= +go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= +go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= +go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= +go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= +go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= +go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= +go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= +go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= +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.31.0 h1:68CPQngjLL0r2AlUKiSxtQFKvzRVbnzLwMUn5SzcLHo= +golang.org/x/net v0.31.0/go.mod h1:P4fl1q7dY2hnZFxEk4pPSkDHF+QqjitcnDjUQyMM+pM= +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.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.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.20.0 h1:gK/Kv2otX8gz+wn7Rmb3vT96ZwuoxnQlY+HlJVj7Qug= +golang.org/x/text v0.20.0/go.mod h1:D4IsuqiFMhST5bX19pQ9ikHC2GsaKyk/oF+pn3ducp4= +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-20241118233622-e639e219e697 h1:LWZqQOEjDyONlF1H6afSWpAL/znlREo2tHfLoe+8LMA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20241118233622-e639e219e697/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= +google.golang.org/grpc v1.68.0 h1:aHQeeJbo8zAkAa3pRzrVjZlbz6uSfeOXlJNQM0RAbz0= +google.golang.org/grpc v1.68.0/go.mod h1:fmSPC5AsjSBCK54MyHRx48kpOti1/jRfOlwEWywNjWA= +google.golang.org/protobuf v1.35.2 h1:8Ar7bF+apOIoThw1EdZl0p1oWvMqTHmpA2fRTyZO8io= +google.golang.org/protobuf v1.35.2/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +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/receiver/huaweicloudcesreceiver/internal/metadata/generated_status.go b/receiver/huaweicloudcesreceiver/internal/metadata/generated_status.go new file mode 100644 index 000000000000..b91aef665ff8 --- /dev/null +++ b/receiver/huaweicloudcesreceiver/internal/metadata/generated_status.go @@ -0,0 +1,16 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("huaweicloudcesreceiver") + ScopeName = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/huaweicloudcesreceiver" +) + +const ( + MetricsStability = component.StabilityLevelDevelopment +) diff --git a/receiver/huaweicloudcesreceiver/metadata.yaml b/receiver/huaweicloudcesreceiver/metadata.yaml new file mode 100644 index 000000000000..53e902feb1de --- /dev/null +++ b/receiver/huaweicloudcesreceiver/metadata.yaml @@ -0,0 +1,13 @@ +type: huaweicloudcesreceiver + +status: + class: receiver + stability: + development: [metrics] + distributions: [] + codeowners: + active: [heitorganzeli, narcis96, mwear] + +tests: + skip_lifecycle: true + skip_shutdown: true \ No newline at end of file diff --git a/receiver/iisreceiver/go.mod b/receiver/iisreceiver/go.mod index 94b370e54727..18e665e5c371 100644 --- a/receiver/iisreceiver/go.mod +++ b/receiver/iisreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/receiver/iisreceiver/go.sum b/receiver/iisreceiver/go.sum index bbe3c65d9bb5..63c92b408494 100644 --- a/receiver/iisreceiver/go.sum +++ b/receiver/iisreceiver/go.sum @@ -118,8 +118,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/influxdbreceiver/go.mod b/receiver/influxdbreceiver/go.mod index 5135004681f1..6e776be0c2e2 100644 --- a/receiver/influxdbreceiver/go.mod +++ b/receiver/influxdbreceiver/go.mod @@ -9,7 +9,7 @@ require ( github.com/influxdata/influxdb1-client v0.0.0-20220302092344-a9ab5670611c github.com/influxdata/line-protocol/v2 v2.2.1 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/influxdbreceiver/go.sum b/receiver/influxdbreceiver/go.sum index b1d4617d75f4..b620cf1e344d 100644 --- a/receiver/influxdbreceiver/go.sum +++ b/receiver/influxdbreceiver/go.sum @@ -103,8 +103,8 @@ github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU github.com/spkg/bom v0.0.0-20160624110644-59b7046e48ad/go.mod h1:qLr4V1qq6nMqFKkMo8ZTx3f+BZEkzsRUY10Xsm2mwU0= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/receiver/jaegerreceiver/go.mod b/receiver/jaegerreceiver/go.mod index 35c66ac9d80d..cb3d093132b0 100644 --- a/receiver/jaegerreceiver/go.mod +++ b/receiver/jaegerreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/jaegertracing/jaeger v1.62.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/jaegerreceiver/go.sum b/receiver/jaegerreceiver/go.sum index c3229cb35757..fadaf126a80d 100644 --- a/receiver/jaegerreceiver/go.sum +++ b/receiver/jaegerreceiver/go.sum @@ -116,8 +116,8 @@ github.com/spf13/viper v1.19.0 h1:RWq5SEjt8o25SROyN3z2OrDB9l7RPd3lwTWU8EcEdcI= github.com/spf13/viper v1.19.0/go.mod h1:GQUN9bilAbhU/jgc1bKs99f/suXKeUMct8Adx5+Ntkg= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/receiver/jmxreceiver/go.mod b/receiver/jmxreceiver/go.mod index a74427233f7d..777928c953aa 100644 --- a/receiver/jmxreceiver/go.mod +++ b/receiver/jmxreceiver/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/shirou/gopsutil/v4 v4.24.10 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.34.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/jmxreceiver/go.sum b/receiver/jmxreceiver/go.sum index f21f09cc0567..634bb9980890 100644 --- a/receiver/jmxreceiver/go.sum +++ b/receiver/jmxreceiver/go.sum @@ -134,8 +134,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/journaldreceiver/go.mod b/receiver/journaldreceiver/go.mod index a76596b66c32..39ac740b9ba9 100644 --- a/receiver/journaldreceiver/go.mod +++ b/receiver/journaldreceiver/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 go.opentelemetry.io/collector/consumer v0.114.0 diff --git a/receiver/journaldreceiver/go.sum b/receiver/journaldreceiver/go.sum index f92fbb0647e3..09e9847b6738 100644 --- a/receiver/journaldreceiver/go.sum +++ b/receiver/journaldreceiver/go.sum @@ -65,8 +65,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/k8sclusterreceiver/e2e_test.go b/receiver/k8sclusterreceiver/e2e_test.go index cebb087686b5..1f571d486dfd 100644 --- a/receiver/k8sclusterreceiver/e2e_test.go +++ b/receiver/k8sclusterreceiver/e2e_test.go @@ -128,7 +128,6 @@ func TestE2EClusterScoped(t *testing.T) { // make docker-otelcontribcol // KUBECONFIG=/tmp/kube-config-otelcol-e2e-testing kind load docker-image otelcontribcol:latest func TestE2ENamespaceScoped(t *testing.T) { - var expected pmetric.Metrics expected, err := golden.ReadMetrics(expectedFileNamespaceScoped) require.NoError(t, err) diff --git a/receiver/k8sclusterreceiver/go.mod b/receiver/k8sclusterreceiver/go.mod index fbeef42eae8f..7cc7659bbc6b 100644 --- a/receiver/k8sclusterreceiver/go.mod +++ b/receiver/k8sclusterreceiver/go.mod @@ -15,7 +15,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/openshift/api v3.9.0+incompatible github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 @@ -31,9 +31,9 @@ require ( go.opentelemetry.io/collector/semconv v0.114.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - k8s.io/api v0.31.2 - k8s.io/apimachinery v0.31.2 - k8s.io/client-go v0.31.2 + k8s.io/api v0.31.3 + k8s.io/apimachinery v0.31.3 + k8s.io/client-go v0.31.3 ) require ( diff --git a/receiver/k8sclusterreceiver/go.sum b/receiver/k8sclusterreceiver/go.sum index 281f582143f5..434adb10c162 100644 --- a/receiver/k8sclusterreceiver/go.sum +++ b/receiver/k8sclusterreceiver/go.sum @@ -291,8 +291,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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -651,14 +651,14 @@ 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.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= -k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= -k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= -k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= 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= diff --git a/receiver/k8sclusterreceiver/receiver_test.go b/receiver/k8sclusterreceiver/receiver_test.go index 9685e640a6f9..46623c0569e9 100644 --- a/receiver/k8sclusterreceiver/receiver_test.go +++ b/receiver/k8sclusterreceiver/receiver_test.go @@ -279,7 +279,8 @@ func setupReceiver( logsConsumer consumer.Logs, initialSyncTimeout time.Duration, tt componenttest.TestTelemetry, - namespace string) *kubernetesReceiver { + namespace string, +) *kubernetesReceiver { distribution := distributionKubernetes if osQuotaClient != nil { distribution = distributionOpenShift diff --git a/receiver/k8seventsreceiver/go.mod b/receiver/k8seventsreceiver/go.mod index 0d1ff1dc852e..f1dd3bd3d211 100644 --- a/receiver/k8seventsreceiver/go.mod +++ b/receiver/k8seventsreceiver/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 @@ -16,9 +16,9 @@ require ( go.opentelemetry.io/collector/semconv v0.114.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - k8s.io/api v0.31.2 - k8s.io/apimachinery v0.31.2 - k8s.io/client-go v0.31.2 + k8s.io/api v0.31.3 + k8s.io/apimachinery v0.31.3 + k8s.io/client-go v0.31.3 ) require ( diff --git a/receiver/k8seventsreceiver/go.sum b/receiver/k8seventsreceiver/go.sum index ce2fd38dd0ab..286682fcfc71 100644 --- a/receiver/k8seventsreceiver/go.sum +++ b/receiver/k8seventsreceiver/go.sum @@ -243,8 +243,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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -553,14 +553,14 @@ 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.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= -k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= -k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= -k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= 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= diff --git a/receiver/k8sobjectsreceiver/go.mod b/receiver/k8sobjectsreceiver/go.mod index 7e49aed62163..466221cda0d4 100644 --- a/receiver/k8sobjectsreceiver/go.mod +++ b/receiver/k8sobjectsreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 @@ -20,8 +20,8 @@ require ( go.opentelemetry.io/collector/receiver/receivertest v0.114.0 go.opentelemetry.io/collector/semconv v0.114.0 go.uber.org/zap v1.27.0 - k8s.io/apimachinery v0.31.2 - k8s.io/client-go v0.31.2 + k8s.io/apimachinery v0.31.3 + k8s.io/client-go v0.31.3 ) require ( @@ -123,7 +123,7 @@ require ( 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.31.2 // indirect + k8s.io/api v0.31.3 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect diff --git a/receiver/k8sobjectsreceiver/go.sum b/receiver/k8sobjectsreceiver/go.sum index 7446c456676e..a23ccbc9bfec 100644 --- a/receiver/k8sobjectsreceiver/go.sum +++ b/receiver/k8sobjectsreceiver/go.sum @@ -289,8 +289,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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -648,14 +648,14 @@ 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.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= -k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= -k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= -k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= 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= diff --git a/receiver/kafkametricsreceiver/go.mod b/receiver/kafkametricsreceiver/go.mod index cba65e9e52c3..47a2276ac692 100644 --- a/receiver/kafkametricsreceiver/go.mod +++ b/receiver/kafkametricsreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/IBM/sarama v1.43.3 github.com/google/go-cmp v0.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configtls v1.20.0 diff --git a/receiver/kafkametricsreceiver/go.sum b/receiver/kafkametricsreceiver/go.sum index 78c6b0f0dc43..6858e509ee8e 100644 --- a/receiver/kafkametricsreceiver/go.sum +++ b/receiver/kafkametricsreceiver/go.sum @@ -102,8 +102,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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/kafkareceiver/go.mod b/receiver/kafkareceiver/go.mod index a9cb4c77a758..190e685ea301 100644 --- a/receiver/kafkareceiver/go.mod +++ b/receiver/kafkareceiver/go.mod @@ -15,7 +15,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.114.0 github.com/openzipkin/zipkin-go v0.4.3 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configtelemetry v0.114.0 diff --git a/receiver/kafkareceiver/go.sum b/receiver/kafkareceiver/go.sum index 16d6b9befee3..f84bc9e8a486 100644 --- a/receiver/kafkareceiver/go.sum +++ b/receiver/kafkareceiver/go.sum @@ -112,8 +112,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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/kubeletstatsreceiver/go.mod b/receiver/kubeletstatsreceiver/go.mod index 8c1f36ccf061..3065f1ed4498 100644 --- a/receiver/kubeletstatsreceiver/go.mod +++ b/receiver/kubeletstatsreceiver/go.mod @@ -10,7 +10,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confignet v1.20.0 @@ -28,10 +28,10 @@ require ( go.opentelemetry.io/collector/semconv v0.114.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - k8s.io/api v0.31.2 - k8s.io/apimachinery v0.31.2 - k8s.io/client-go v0.31.2 - k8s.io/kubelet v0.31.2 + k8s.io/api v0.31.3 + k8s.io/apimachinery v0.31.3 + k8s.io/client-go v0.31.3 + k8s.io/kubelet v0.31.3 ) require ( diff --git a/receiver/kubeletstatsreceiver/go.sum b/receiver/kubeletstatsreceiver/go.sum index 2e5a770f4a01..44805af11617 100644 --- a/receiver/kubeletstatsreceiver/go.sum +++ b/receiver/kubeletstatsreceiver/go.sum @@ -291,8 +291,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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -654,14 +654,14 @@ 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.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= -k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= -k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= -k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= -k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= -k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= 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= @@ -673,8 +673,8 @@ k8s.io/klog/v2 v2.130.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-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340/go.mod h1:yD4MZYeKMBwQKVht279WycxKyM84kkAx2DPrTXaeb98= -k8s.io/kubelet v0.31.2 h1:6Hytyw4LqWqhgzoi7sPfpDGClu2UfxmPmaiXPC4FRgI= -k8s.io/kubelet v0.31.2/go.mod h1:0E4++3cMWi2cJxOwuaQP3eMBa7PSOvAFgkTPlVc/2FA= +k8s.io/kubelet v0.31.3 h1:DIXRAmvVGp42mV2vpA1GCLU6oO8who0/vp3Oq6kSpbI= +k8s.io/kubelet v0.31.3/go.mod h1:KSdbEfNy5VzqUlAHlytA/fH12s+sE1u8fb/8JY9sL/8= k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 h1:pUdcCO1Lk/tbT5ztQWOBi5HBgbBP1J8+AsQnQCKsi8A= k8s.io/utils v0.0.0-20240711033017-18e509b52bc8/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= diff --git a/receiver/lokireceiver/go.mod b/receiver/lokireceiver/go.mod index 181f62b186cd..02c9d31585c3 100644 --- a/receiver/lokireceiver/go.mod +++ b/receiver/lokireceiver/go.mod @@ -14,7 +14,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.114.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/loki v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.114.0 // indirect - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/receiver/lokireceiver/go.sum b/receiver/lokireceiver/go.sum index 0623da8436ec..ec6532275f35 100644 --- a/receiver/lokireceiver/go.sum +++ b/receiver/lokireceiver/go.sum @@ -120,8 +120,8 @@ github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/receiver/memcachedreceiver/go.mod b/receiver/memcachedreceiver/go.mod index 1b4ad5c9ae11..a89fe920b1e6 100644 --- a/receiver/memcachedreceiver/go.mod +++ b/receiver/memcachedreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.34.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/memcachedreceiver/go.sum b/receiver/memcachedreceiver/go.sum index 868c60adcb47..6029bfd8607d 100644 --- a/receiver/memcachedreceiver/go.sum +++ b/receiver/memcachedreceiver/go.sum @@ -120,8 +120,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/mongodbatlasreceiver/go.mod b/receiver/mongodbatlasreceiver/go.mod index 750d9e1d1bfb..50f635b93847 100644 --- a/receiver/mongodbatlasreceiver/go.mod +++ b/receiver/mongodbatlasreceiver/go.mod @@ -10,7 +10,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.mongodb.org/atlas v0.37.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 diff --git a/receiver/mongodbatlasreceiver/go.sum b/receiver/mongodbatlasreceiver/go.sum index 03e682d385b1..3fa2b38e6c4d 100644 --- a/receiver/mongodbatlasreceiver/go.sum +++ b/receiver/mongodbatlasreceiver/go.sum @@ -74,8 +74,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/mongodbreceiver/go.mod b/receiver/mongodbreceiver/go.mod index 35b3b942ca96..a18e1d7485df 100644 --- a/receiver/mongodbreceiver/go.mod +++ b/receiver/mongodbreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.34.0 go.mongodb.org/mongo-driver v1.17.1 go.opentelemetry.io/collector/component v0.114.0 diff --git a/receiver/mongodbreceiver/go.sum b/receiver/mongodbreceiver/go.sum index bd5bb1ef3b3d..be085cab7f98 100644 --- a/receiver/mongodbreceiver/go.sum +++ b/receiver/mongodbreceiver/go.sum @@ -126,8 +126,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/mysqlreceiver/go.mod b/receiver/mysqlreceiver/go.mod index f18f5dde9387..bf7f08027edb 100644 --- a/receiver/mysqlreceiver/go.mod +++ b/receiver/mysqlreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.34.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/mysqlreceiver/go.sum b/receiver/mysqlreceiver/go.sum index 89edcf4b5eda..114aa99dd92e 100644 --- a/receiver/mysqlreceiver/go.sum +++ b/receiver/mysqlreceiver/go.sum @@ -126,8 +126,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/namedpipereceiver/go.mod b/receiver/namedpipereceiver/go.mod index 31ac4f20a6cc..fb97c36e0bb8 100644 --- a/receiver/namedpipereceiver/go.mod +++ b/receiver/namedpipereceiver/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 go.opentelemetry.io/collector/consumer v0.114.0 // indirect diff --git a/receiver/namedpipereceiver/go.sum b/receiver/namedpipereceiver/go.sum index 68495d414b88..4f9608cfbbd6 100644 --- a/receiver/namedpipereceiver/go.sum +++ b/receiver/namedpipereceiver/go.sum @@ -67,8 +67,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/netflowreceiver/Makefile b/receiver/netflowreceiver/Makefile new file mode 100644 index 000000000000..ded7a36092dc --- /dev/null +++ b/receiver/netflowreceiver/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/receiver/netflowreceiver/README.md b/receiver/netflowreceiver/README.md new file mode 100644 index 000000000000..30443c6d1199 --- /dev/null +++ b/receiver/netflowreceiver/README.md @@ -0,0 +1,102 @@ +# Netflow receiver + +| Status | | +| ------------- |-----------| +| Stability | [development]: logs | +| Distributions | [] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Fnetflow%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Fnetflow) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Fnetflow%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Fnetflow) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@evan-bradley](https://www.github.com/evan-bradley), [@dlopes7](https://www.github.com/dlopes7) | + +[development]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#development + + +The netflow receiver can listen for [netflow](https://en.wikipedia.org/wiki/NetFlow), [sflow](https://en.wikipedia.org/wiki/SFlow), and [ipfix](https://en.wikipedia.org/wiki/IP_Flow_Information_Export) data and convert it to OpenTelemetry logs. The receiver is based on the [goflow2](https://github.com/netsampler/goflow2) project. + +This gives OpenTelemetry users the capability of monitoring network traffic, and answer questions like: + +* Which protocols are passing through the network? +* Which servers and clients are producing the highest amount of traffic? +* What ports are involved in these network calls? +* How many bytes and packets are being sent and received? + +## Getting started + +By default the receiver will listen for ipfix and netflow on port `2055`. The receiver can be configured to listen on different ports and protocols. + +Example configuration: + +```yaml +receivers: + netflow: + - scheme: netflow + port: 2055 + sockets: 16 + workers: 32 + +processors: + batch: + send_batch_size: 2000 + timeout: 30s + +exporters: + debug: + verbosity: detailed + +service: + pipelines: + logs: + receivers: [netflow] + processors: [batch] + exporters: [debug] + telemetry: + logs: + level: debug +``` + +We recommend using the batch processor to reduce the number of log requests being sent to the exporter. The batch processor will batch log records together and send them in a single request to the exporter. + +You would then configure your network devices to send netflow, sflow, or ipfix data to the Collector on the specified ports. + +## Configuration + +| Field | Description | Examples | Default | +|-------|-------------|--------| ------- | +| scheme | The type of flow data that to receive | `sflow`, `netflow`, `flow` | `netflow` | +| hostname | The hostname or IP address to bind to | `localhost` | `0.0.0.0` | +| port | The port to bind to | `2055` or `6343` | `2055` | +| sockets | The number of sockets to use | 1 | 1 | +| workers | The number of workers used to decode incoming flow messages | 2 | 2 | +| queue_size | The size of the incoming netflow packets queue | 1000 | 1000000 | + +## Data format + +The netflow data is standardized for the different schemas and is converted to OpenTelemetry logs following the [semantic conventions](https://opentelemetry.io/docs/specs/semconv/general/attributes/#server-client-and-shared-network-attributes) + +The output will adhere the format: + +```json +{ + "destination": { + "address": "192.168.0.1", + "port": 22 + }, + "flow": { + "end": 1731073104662487000, + "sampler_address": "192.168.0.2", + "sequence_num": 49, + "start": 1731073077662487000, + "time_received": 1731073138662487000, + "type": "NETFLOW_V5" + }, + "io": { + "bytes": 529, + "packets": 378 + }, + "source": { + "address": "192.168.0.3", + "port": 40 + }, + "transport": "TCP", + "type": "IPv4" +} +``` diff --git a/receiver/netflowreceiver/config.go b/receiver/netflowreceiver/config.go new file mode 100644 index 000000000000..e92eb79feb2e --- /dev/null +++ b/receiver/netflowreceiver/config.go @@ -0,0 +1,65 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package netflowreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver" + +import "fmt" + +// Config represents the receiver config settings within the collector's config.yaml +type Config struct { + // The scheme defines the type of flow data that the listener will receive + // The scheme must be one of sflow, netflow, or flow + Scheme string `mapstructure:"scheme"` + + // The hostname or IP address that the listener will bind to + Hostname string `mapstructure:"hostname"` + + // The port that the listener will bind to + Port int `mapstructure:"port"` + + // The number of sockets that the listener will use + Sockets int `mapstructure:"sockets"` + + // The number of workers that the listener will use to decode incoming flow messages + // By default it will be two times the number of sockets + // Ideally set this to the number of CPU cores + Workers int `mapstructure:"workers"` + + // The size of the queue that the listener will use + // This is a buffer that will hold flow messages before they are processed by a worker + QueueSize int `mapstructure:"queue_size"` +} + +// Validate checks if the receiver configuration is valid +func (cfg *Config) Validate() error { + validSchemes := [3]string{"sflow", "netflow", "flow"} + + validScheme := false + for _, scheme := range validSchemes { + if cfg.Scheme == scheme { + validScheme = true + break + } + } + if !validScheme { + return fmt.Errorf("scheme must be one of sflow, netflow, or flow") + } + + if cfg.Sockets <= 0 { + return fmt.Errorf("sockets must be greater than 0") + } + + if cfg.Workers <= 0 { + return fmt.Errorf("workers must be greater than 0") + } + + if cfg.QueueSize <= 0 { + cfg.QueueSize = defaultQueueSize + } + + if cfg.Port <= 0 { + return fmt.Errorf("port must be greater than 0") + } + + return nil +} diff --git a/receiver/netflowreceiver/config_test.go b/receiver/netflowreceiver/config_test.go new file mode 100644 index 000000000000..167eaadaaf1e --- /dev/null +++ b/receiver/netflowreceiver/config_test.go @@ -0,0 +1,92 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package netflowreceiver + +import ( + "path/filepath" + "testing" + + "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/receiver/netflowreceiver/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, "defaults"), + expected: createDefaultConfig(), + }, + { + id: component.NewIDWithName(metadata.Type, "one_listener"), + expected: &Config{ + Scheme: "netflow", + Port: 2055, + Sockets: 1, + Workers: 1, + QueueSize: 1000000, + }, + }, + } + + 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, sub.Unmarshal(cfg)) + + assert.NoError(t, component.ValidateConfig(cfg)) + assert.Equal(t, tt.expected, cfg) + }) + } +} + +func TestInvalidConfig(t *testing.T) { + t.Parallel() + + cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) + require.NoError(t, err) + + tests := []struct { + id component.ID + err string + }{ + { + id: component.NewIDWithName(metadata.Type, "invalid_schema"), + err: "scheme must be one of sflow, netflow, or flow", + }, + { + id: component.NewIDWithName(metadata.Type, "invalid_port"), + err: "port must be greater than 0", + }, + } + + 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, sub.Unmarshal(cfg)) + + err = component.ValidateConfig(cfg) + assert.ErrorContains(t, err, tt.err) + }) + } +} diff --git a/receiver/netflowreceiver/doc.go b/receiver/netflowreceiver/doc.go new file mode 100644 index 000000000000..51ac969c3e90 --- /dev/null +++ b/receiver/netflowreceiver/doc.go @@ -0,0 +1,6 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +//go:generate mdatagen metadata.yaml + +package netflowreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver" diff --git a/receiver/netflowreceiver/factory.go b/receiver/netflowreceiver/factory.go new file mode 100644 index 000000000000..87c27e9b76ed --- /dev/null +++ b/receiver/netflowreceiver/factory.go @@ -0,0 +1,51 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package netflowreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver" + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/receiver" + + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver/internal/metadata" +) + +const ( + defaultSockets = 1 + defaultWorkers = 2 + defaultQueueSize = 1_000_000 +) + +// NewFactory creates a factory for netflow receiver. +func NewFactory() receiver.Factory { + return receiver.NewFactory( + metadata.Type, + createDefaultConfig, + receiver.WithLogs(createLogsReceiver, metadata.LogsStability)) +} + +func createDefaultConfig() component.Config { + return &Config{ + Scheme: "netflow", + Port: 2055, + Sockets: defaultSockets, + Workers: defaultWorkers, + QueueSize: defaultQueueSize, + } +} + +func createLogsReceiver(_ context.Context, params receiver.Settings, cfg component.Config, consumer consumer.Logs) (receiver.Logs, error) { + logger := params.Logger + conf := cfg.(*Config) + + nr := &netflowReceiver{ + logger: logger, + logConsumer: consumer, + config: conf, + } + + return nr, nil +} diff --git a/receiver/netflowreceiver/factory_test.go b/receiver/netflowreceiver/factory_test.go new file mode 100644 index 000000000000..5260b66572fd --- /dev/null +++ b/receiver/netflowreceiver/factory_test.go @@ -0,0 +1,30 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package netflowreceiver + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/receiver/receivertest" +) + +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 TestCreateReceiver(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + set := receivertest.NewNopSettings() + receiver, err := factory.CreateLogs(context.Background(), set, cfg, consumertest.NewNop()) + assert.NoError(t, err, "receiver creation failed") + assert.NotNil(t, receiver, "receiver creation failed") +} diff --git a/receiver/netflowreceiver/generated_component_test.go b/receiver/netflowreceiver/generated_component_test.go new file mode 100644 index 000000000000..40ac0909cd8e --- /dev/null +++ b/receiver/netflowreceiver/generated_component_test.go @@ -0,0 +1,69 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package netflowreceiver + +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/consumer/consumertest" + "go.opentelemetry.io/collector/receiver" + "go.opentelemetry.io/collector/receiver/receivertest" +) + +func TestComponentFactoryType(t *testing.T) { + require.Equal(t, "netflow", NewFactory().Type().String()) +} + +func TestComponentConfigStruct(t *testing.T) { + require.NoError(t, componenttest.CheckConfigStruct(NewFactory().CreateDefaultConfig())) +} + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set receiver.Settings, cfg component.Config) (component.Component, error) + }{ + + { + name: "logs", + createFn: func(ctx context.Context, set receiver.Settings, cfg component.Config) (component.Component, error) { + return factory.CreateLogs(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, sub.Unmarshal(&cfg)) + + for _, tt := range tests { + t.Run(tt.name+"-shutdown", func(t *testing.T) { + c, err := tt.createFn(context.Background(), receivertest.NewNopSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + t.Run(tt.name+"-lifecycle", func(t *testing.T) { + firstRcvr, err := tt.createFn(context.Background(), receivertest.NewNopSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + require.NoError(t, err) + require.NoError(t, firstRcvr.Start(context.Background(), host)) + require.NoError(t, firstRcvr.Shutdown(context.Background())) + secondRcvr, err := tt.createFn(context.Background(), receivertest.NewNopSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondRcvr.Start(context.Background(), host)) + require.NoError(t, secondRcvr.Shutdown(context.Background())) + }) + } +} diff --git a/receiver/netflowreceiver/generated_package_test.go b/receiver/netflowreceiver/generated_package_test.go new file mode 100644 index 000000000000..533c7f68ea70 --- /dev/null +++ b/receiver/netflowreceiver/generated_package_test.go @@ -0,0 +1,13 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package netflowreceiver + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +} diff --git a/receiver/netflowreceiver/go.mod b/receiver/netflowreceiver/go.mod new file mode 100644 index 000000000000..55718f06e0cb --- /dev/null +++ b/receiver/netflowreceiver/go.mod @@ -0,0 +1,56 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver + +go 1.22.0 + +toolchain go1.22.2 + +require ( + github.com/stretchr/testify v1.10.0 + go.opentelemetry.io/collector/component v0.114.0 + go.opentelemetry.io/collector/component/componenttest v0.114.0 + go.opentelemetry.io/collector/confmap v1.20.0 + go.opentelemetry.io/collector/consumer v0.114.0 + go.opentelemetry.io/collector/consumer/consumertest v0.114.0 + go.opentelemetry.io/collector/receiver v0.114.0 + go.opentelemetry.io/collector/receiver/receivertest v0.114.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-logr/logr v1.4.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-viper/mapstructure/v2 v2.2.1 // indirect + github.com/gogo/protobuf v1.3.2 // 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.2 // 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 + go.opentelemetry.io/collector/config/configtelemetry v0.114.0 // indirect + go.opentelemetry.io/collector/consumer/consumererror v0.114.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.114.0 // indirect + go.opentelemetry.io/collector/pdata v1.20.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.114.0 // indirect + go.opentelemetry.io/collector/pipeline v0.114.0 // indirect + go.opentelemetry.io/collector/receiver/receiverprofiles v0.114.0 // indirect + go.opentelemetry.io/otel v1.32.0 // indirect + go.opentelemetry.io/otel/metric v1.32.0 // indirect + go.opentelemetry.io/otel/sdk v1.32.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.32.0 // indirect + go.opentelemetry.io/otel/trace v1.32.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sys v0.27.0 // indirect + golang.org/x/text v0.17.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd // indirect + google.golang.org/grpc v1.67.1 // indirect + google.golang.org/protobuf v1.35.1 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/receiver/netflowreceiver/go.sum b/receiver/netflowreceiver/go.sum new file mode 100644 index 000000000000..fc3055724631 --- /dev/null +++ b/receiver/netflowreceiver/go.sum @@ -0,0 +1,138 @@ +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.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= +github.com/go-logr/logr v1.4.2/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.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss= +github.com/go-viper/mapstructure/v2 v2.2.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/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.2 h1:I2rtLRqXRy1p01m/utEtpZSSA6dcJbgGVuE27kW2PzQ= +github.com/knadh/koanf/v2 v2.1.2/go.mod h1:Gphfaen0q1Fc1HTgJgSTC4oRX9R2R5ErYMZJy8fLJBo= +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/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.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= +go.opentelemetry.io/collector/component v0.114.0/go.mod h1:MLxtjZ6UVHjDxSdhGLuJfHBHvfl1iT/Y7IaQPD24Eww= +go.opentelemetry.io/collector/component/componenttest v0.114.0 h1:GM4FTTlfeXoVm6sZYBHImwlRN8ayh2oAfUhvaFj7Zo8= +go.opentelemetry.io/collector/component/componenttest v0.114.0/go.mod h1:ZZEJMtbJtoVC/3/9R1HzERq+cYQRxuMFQrPCpfZ4Xos= +go.opentelemetry.io/collector/config/configtelemetry v0.114.0 h1:kjLeyrumge6wsX6ZIkicdNOlBXaEyW2PI2ZdVXz/rzY= +go.opentelemetry.io/collector/config/configtelemetry v0.114.0/go.mod h1:R0MBUxjSMVMIhljuDHWIygzzJWQyZHXXWIgQNxcFwhc= +go.opentelemetry.io/collector/confmap v1.20.0 h1:ARfOwmkKxFOud1njl03yAHQ30+uenlzqCO6LBYamDTE= +go.opentelemetry.io/collector/confmap v1.20.0/go.mod h1:DMpd9Ay/ffls3JoQBQ73vWeRsz1rNuLbwjo6WtjSQus= +go.opentelemetry.io/collector/consumer v0.114.0 h1:1zVaHvfIZowGwZRitRBRo3i+RP2StlU+GClYiofSw0Q= +go.opentelemetry.io/collector/consumer v0.114.0/go.mod h1:d+Mrzt9hsH1ub3zmwSlnQVPLeTYir4Mgo7CrWfnncN4= +go.opentelemetry.io/collector/consumer/consumererror v0.114.0 h1:r2YiELfWerb40FHD23V04gNjIkLUcjEKGxI4Vtm2iO4= +go.opentelemetry.io/collector/consumer/consumererror v0.114.0/go.mod h1:MzIrLQ5jptO2egypolhlAbZsWZr29WC4FhSxQjnxcvg= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.114.0 h1:5pXYy3E6UK5Huu3aQbsYL8B6E6MyWx4fvXXDn+oXZaA= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.114.0/go.mod h1:PMq3f54KcJQO4v1tue0QxQScu7REFVADlXxXSAYMiN0= +go.opentelemetry.io/collector/consumer/consumertest v0.114.0 h1:isaTwJK5DOy8Bs7GuLq23ejfgj8gLIo5dOUvkRnLF4g= +go.opentelemetry.io/collector/consumer/consumertest v0.114.0/go.mod h1:GNeLPkfRPdh06n/Rv1UKa/cAtCKjN0a7ADyHjIj4HFE= +go.opentelemetry.io/collector/pdata v1.20.0 h1:ePcwt4bdtISP0loHaE+C9xYoU2ZkIvWv89Fob16o9SM= +go.opentelemetry.io/collector/pdata v1.20.0/go.mod h1:Ox1YVLe87cZDB/TL30i4SUz1cA5s6AM6SpFMfY61ICs= +go.opentelemetry.io/collector/pdata/pprofile v0.114.0 h1:pUNfTzsI/JUTiE+DScDM4lsrPoxnVNLI2fbTxR/oapo= +go.opentelemetry.io/collector/pdata/pprofile v0.114.0/go.mod h1:4aNcj6WM1n1uXyFSXlhVs4ibrERgNYsTbzcYI2zGhxA= +go.opentelemetry.io/collector/pdata/testdata v0.114.0 h1:+AzszWSL1i4K6meQ8rU0JDDW55SYCXa6FVqfDixhhTo= +go.opentelemetry.io/collector/pdata/testdata v0.114.0/go.mod h1:bv8XFdCTZxG2MQB5l9dKxSxf5zBrcodwO6JOy1+AxXM= +go.opentelemetry.io/collector/pipeline v0.114.0 h1:v3YOhc5z0tD6QbO5n/pnftpIeroihM2ks9Z2yKPCcwY= +go.opentelemetry.io/collector/pipeline v0.114.0/go.mod h1:4vOvjVsoYTHVGTbfFwqfnQOSV2K3RKUHofh3jNRc2Mg= +go.opentelemetry.io/collector/receiver v0.114.0 h1:90SAnXAjNq7/k52/pFmmb06Cf1YauoPYtbio4aOXafY= +go.opentelemetry.io/collector/receiver v0.114.0/go.mod h1:KUGT0/D953LXbGH/D3lLPU8yrU3HfWnUqpt4W4hSOnE= +go.opentelemetry.io/collector/receiver/receiverprofiles v0.114.0 h1:ibhEfGpvNB3yrtpl2jYFabrunMk1hurxvMYpM0b1Ck4= +go.opentelemetry.io/collector/receiver/receiverprofiles v0.114.0/go.mod h1:UZyRfaasw+NLvN10AN8IQnmj5tQ3BOUH1uP2ctpO9f0= +go.opentelemetry.io/collector/receiver/receivertest v0.114.0 h1:D+Kh9t2n4asTnM+TiSxbrKlUemLZandWntj17BJWWb0= +go.opentelemetry.io/collector/receiver/receivertest v0.114.0/go.mod h1:mNSHQ13vFmqD+VAcRzLjStFBejbcWUn2Mp0pAd7Op+U= +go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= +go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= +go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= +go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= +go.opentelemetry.io/otel/sdk v1.32.0 h1:RNxepc9vK59A8XsgZQouW8ue8Gkb4jpWtJm9ge5lEG4= +go.opentelemetry.io/otel/sdk v1.32.0/go.mod h1:LqgegDBjKMmb2GC6/PrTnteJG39I8/vJCAP9LlJXEjU= +go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU= +go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ= +go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= +go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= +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.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +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.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= +golang.org/x/sys v0.27.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.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= +golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +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-20240822170219-fc7c04adadcd h1:6TEm2ZxXoQmFWFlt1vNxvVOa1Q0dXFQD1m/rYjXmS0E= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/protobuf v1.35.1 h1:m3LfL6/Ca+fqnjnlqQXNpFPABW1UD7mjh8KO2mKFytA= +google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +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/receiver/netflowreceiver/internal/metadata/generated_status.go b/receiver/netflowreceiver/internal/metadata/generated_status.go new file mode 100644 index 000000000000..65987878f5fd --- /dev/null +++ b/receiver/netflowreceiver/internal/metadata/generated_status.go @@ -0,0 +1,16 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "go.opentelemetry.io/collector/component" +) + +var ( + Type = component.MustNewType("netflow") + ScopeName = "otelcol/netflowreceiver" +) + +const ( + LogsStability = component.StabilityLevelDevelopment +) diff --git a/receiver/netflowreceiver/listener.go b/receiver/netflowreceiver/listener.go new file mode 100644 index 000000000000..d4507cadec8f --- /dev/null +++ b/receiver/netflowreceiver/listener.go @@ -0,0 +1,11 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package netflowreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver" + +type Listener struct { + // config Config + // logger *zap.Logger + // recv *utils.UDPReceiver + // logConsumer consumer.Logs +} diff --git a/receiver/netflowreceiver/listener_test.go b/receiver/netflowreceiver/listener_test.go new file mode 100644 index 000000000000..9fbae90c700c --- /dev/null +++ b/receiver/netflowreceiver/listener_test.go @@ -0,0 +1,27 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package netflowreceiver + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/receiver/receivertest" +) + +func TestCreateValidDefaultListener(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + set := receivertest.NewNopSettings() + receiver, err := factory.CreateLogs(context.Background(), set, cfg, consumertest.NewNop()) + assert.NoError(t, err, "receiver creation failed") + assert.NotNil(t, receiver, "receiver creation failed") + assert.Equal(t, "netflow", receiver.(*netflowReceiver).config.Scheme) + assert.Equal(t, 2055, receiver.(*netflowReceiver).config.Port) + assert.Equal(t, 1, receiver.(*netflowReceiver).config.Sockets) + assert.Equal(t, 2, receiver.(*netflowReceiver).config.Workers) + assert.Equal(t, 1_000_000, receiver.(*netflowReceiver).config.QueueSize) +} diff --git a/receiver/netflowreceiver/metadata.yaml b/receiver/netflowreceiver/metadata.yaml new file mode 100644 index 000000000000..e79e947a4542 --- /dev/null +++ b/receiver/netflowreceiver/metadata.yaml @@ -0,0 +1,10 @@ +type: netflow +scope_name: otelcol/netflowreceiver + +status: + class: receiver + stability: + development: [logs] + distributions: [] + codeowners: + active: [evan-bradley, dlopes7] diff --git a/receiver/netflowreceiver/receiver.go b/receiver/netflowreceiver/receiver.go new file mode 100644 index 000000000000..c31bcbe7baaf --- /dev/null +++ b/receiver/netflowreceiver/receiver.go @@ -0,0 +1,29 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package netflowreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver" + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.uber.org/zap" +) + +type netflowReceiver struct { + // host component.Host + // cancel context.CancelFunc + config *Config + logConsumer consumer.Logs + logger *zap.Logger + // listeners []*Listener +} + +func (nr *netflowReceiver) Start(_ context.Context, _ component.Host) error { + return nil +} + +func (nr *netflowReceiver) Shutdown(_ context.Context) error { + return nil +} diff --git a/receiver/netflowreceiver/receiver_test.go b/receiver/netflowreceiver/receiver_test.go new file mode 100644 index 000000000000..ad37d7feebf0 --- /dev/null +++ b/receiver/netflowreceiver/receiver_test.go @@ -0,0 +1,24 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package netflowreceiver + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/receiver/receivertest" +) + +func TestCreateValidDefaultReceiver(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + set := receivertest.NewNopSettings() + receiver, err := factory.CreateLogs(context.Background(), set, cfg, consumertest.NewNop()) + assert.NoError(t, err, "receiver creation failed") + assert.NotNil(t, receiver, "receiver creation failed") + // TODO - Will be added on the following PR + // assert.NotNil(t, "sflow", receiver.(*netflowReceiver).listeners[0].recv) +} diff --git a/receiver/netflowreceiver/testdata/config.yaml b/receiver/netflowreceiver/testdata/config.yaml new file mode 100644 index 000000000000..cbc5f657b145 --- /dev/null +++ b/receiver/netflowreceiver/testdata/config.yaml @@ -0,0 +1,16 @@ +netflow/defaults: + +netflow/one_listener: + scheme: netflow + port: 2055 + sockets: 1 + workers: 1 + +netflow/invalid_schema: + scheme: invalid + +netflow/invalid_port: + scheme: netflow + sockets: 1 + workers: 1 + port: 0 diff --git a/receiver/nginxreceiver/go.mod b/receiver/nginxreceiver/go.mod index 2c30857723b4..04c282e31072 100644 --- a/receiver/nginxreceiver/go.mod +++ b/receiver/nginxreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.34.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/nginxreceiver/go.sum b/receiver/nginxreceiver/go.sum index be22372daab7..31cb8180d097 100644 --- a/receiver/nginxreceiver/go.sum +++ b/receiver/nginxreceiver/go.sum @@ -128,8 +128,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/nsxtreceiver/go.mod b/receiver/nsxtreceiver/go.mod index 55d8d65f5c74..e80d585c123b 100644 --- a/receiver/nsxtreceiver/go.mod +++ b/receiver/nsxtreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/vmware/go-vmware-nsxt v0.0.0-20230223012718-d31b8a1ca05e go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/nsxtreceiver/go.sum b/receiver/nsxtreceiver/go.sum index 8836f373432d..cf3c2f5d493a 100644 --- a/receiver/nsxtreceiver/go.sum +++ b/receiver/nsxtreceiver/go.sum @@ -63,8 +63,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/receiver/ntpreceiver/go.mod b/receiver/ntpreceiver/go.mod index a2e57463b915..d44048945751 100644 --- a/receiver/ntpreceiver/go.mod +++ b/receiver/ntpreceiver/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/beevik/ntp v1.4.3 github.com/google/go-cmp v0.6.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/receiver/ntpreceiver/go.sum b/receiver/ntpreceiver/go.sum index 105f994d20b7..48128c1c5e0f 100644 --- a/receiver/ntpreceiver/go.sum +++ b/receiver/ntpreceiver/go.sum @@ -46,8 +46,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/receiver/opencensusreceiver/go.mod b/receiver/opencensusreceiver/go.mod index 2b1f699f240a..97c5dc23f37f 100644 --- a/receiver/opencensusreceiver/go.mod +++ b/receiver/opencensusreceiver/go.mod @@ -10,7 +10,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.114.0 github.com/rs/cors v1.11.1 github.com/soheilhy/cmux v0.1.5 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/opencensusreceiver/go.sum b/receiver/opencensusreceiver/go.sum index 3a70c3ccc418..27b11a0f7427 100644 --- a/receiver/opencensusreceiver/go.sum +++ b/receiver/opencensusreceiver/go.sum @@ -102,8 +102,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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/oracledbreceiver/go.mod b/receiver/oracledbreceiver/go.mod index 313ee8250b92..aad665466fc1 100644 --- a/receiver/oracledbreceiver/go.mod +++ b/receiver/oracledbreceiver/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/google/go-cmp v0.6.0 github.com/sijms/go-ora/v2 v2.8.22 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/receiver/oracledbreceiver/go.sum b/receiver/oracledbreceiver/go.sum index 7c11c9de4bdf..8e4487473eb8 100644 --- a/receiver/oracledbreceiver/go.sum +++ b/receiver/oracledbreceiver/go.sum @@ -46,8 +46,8 @@ github.com/sijms/go-ora/v2 v2.8.22 h1:3ABgRzVKxS439cEgSLjFKutIwOyhnyi4oOSBywEdOl github.com/sijms/go-ora/v2 v2.8.22/go.mod h1:QgFInVi3ZWyqAiJwzBQA+nbKYKH77tdp1PYoCqhR2dU= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/receiver/osqueryreceiver/go.mod b/receiver/osqueryreceiver/go.mod index e7bde3c31473..d3fb85870967 100644 --- a/receiver/osqueryreceiver/go.mod +++ b/receiver/osqueryreceiver/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/osquer go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/receiver v0.114.0 diff --git a/receiver/osqueryreceiver/go.sum b/receiver/osqueryreceiver/go.sum index 5ba04a4d80da..87134820291a 100644 --- a/receiver/osqueryreceiver/go.sum +++ b/receiver/osqueryreceiver/go.sum @@ -32,8 +32,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/receiver/otelarrowreceiver/go.mod b/receiver/otelarrowreceiver/go.mod index df99ce579a4b..966687a4b790 100644 --- a/receiver/otelarrowreceiver/go.mod +++ b/receiver/otelarrowreceiver/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.114.0 github.com/open-telemetry/otel-arrow v0.31.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/client v1.20.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 diff --git a/receiver/otelarrowreceiver/go.sum b/receiver/otelarrowreceiver/go.sum index 276c54da264c..e3d54637979f 100644 --- a/receiver/otelarrowreceiver/go.sum +++ b/receiver/otelarrowreceiver/go.sum @@ -87,8 +87,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/receiver/otelarrowreceiver/internal/arrow/arrow_test.go b/receiver/otelarrowreceiver/internal/arrow/arrow_test.go index 78ac585d5c23..33a8ee62768f 100644 --- a/receiver/otelarrowreceiver/internal/arrow/arrow_test.go +++ b/receiver/otelarrowreceiver/internal/arrow/arrow_test.go @@ -49,8 +49,10 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otelarrowreceiver/internal/arrow/mock" ) -var noopTelemetry = componenttest.NewNopTelemetrySettings() -var testingID = component.MustNewID("testing") +var ( + noopTelemetry = componenttest.NewNopTelemetrySettings() + testingID = component.MustNewID("testing") +) func defaultBQ() admission2.Queue { bq, _ := admission2.NewBoundedQueue(testingID, noopTelemetry, 100000, 10) diff --git a/receiver/otlpjsonfilereceiver/go.mod b/receiver/otlpjsonfilereceiver/go.mod index 3029acf7dc4b..a4c38578c46b 100644 --- a/receiver/otlpjsonfilereceiver/go.mod +++ b/receiver/otlpjsonfilereceiver/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 go.opentelemetry.io/collector/consumer v0.114.0 diff --git a/receiver/otlpjsonfilereceiver/go.sum b/receiver/otlpjsonfilereceiver/go.sum index bbc1355e7f3e..9c158dd9cdb3 100644 --- a/receiver/otlpjsonfilereceiver/go.sum +++ b/receiver/otlpjsonfilereceiver/go.sum @@ -69,8 +69,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/podmanreceiver/go.mod b/receiver/podmanreceiver/go.mod index e3f04ed129fa..4a26a88c079c 100644 --- a/receiver/podmanreceiver/go.mod +++ b/receiver/podmanreceiver/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/google/go-cmp v0.6.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configopaque v1.20.0 diff --git a/receiver/podmanreceiver/go.sum b/receiver/podmanreceiver/go.sum index e09f45f19083..2c10f123a164 100644 --- a/receiver/podmanreceiver/go.sum +++ b/receiver/podmanreceiver/go.sum @@ -44,8 +44,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/receiver/postgresqlreceiver/go.mod b/receiver/postgresqlreceiver/go.mod index 5960e9286cc2..d29d76457cec 100644 --- a/receiver/postgresqlreceiver/go.mod +++ b/receiver/postgresqlreceiver/go.mod @@ -9,7 +9,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.34.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/postgresqlreceiver/go.sum b/receiver/postgresqlreceiver/go.sum index fadd5fafe903..b7cd225d5f6a 100644 --- a/receiver/postgresqlreceiver/go.sum +++ b/receiver/postgresqlreceiver/go.sum @@ -124,8 +124,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/prometheusreceiver/go.mod b/receiver/prometheusreceiver/go.mod index 6d960524bbf0..99679a34dd4f 100644 --- a/receiver/prometheusreceiver/go.mod +++ b/receiver/prometheusreceiver/go.mod @@ -13,7 +13,7 @@ require ( github.com/prometheus/client_golang v1.20.5 github.com/prometheus/common v0.60.1 github.com/prometheus/prometheus v0.54.1 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/prometheusreceiver/go.sum b/receiver/prometheusreceiver/go.sum index a858b1e81381..e81a8a57ec28 100644 --- a/receiver/prometheusreceiver/go.sum +++ b/receiver/prometheusreceiver/go.sum @@ -538,8 +538,9 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/prometheusreceiver/targetallocator/manager_test.go b/receiver/prometheusreceiver/targetallocator/manager_test.go index 113682bc43f7..934e17a33e50 100644 --- a/receiver/prometheusreceiver/targetallocator/manager_test.go +++ b/receiver/prometheusreceiver/targetallocator/manager_test.go @@ -873,18 +873,22 @@ func TestManagerSyncWithInitialScrapeConfigs(t *testing.T) { }, "/jobs/job1/targets": { mockTargetAllocatorResponseRaw{code: 200, data: []hTTPSDResponse{ - {Targets: []string{"localhost:9090", "10.0.10.3:9100", "10.0.10.4:9100", "10.0.10.5:9100"}, + { + Targets: []string{"localhost:9090", "10.0.10.3:9100", "10.0.10.4:9100", "10.0.10.5:9100"}, Labels: map[model.LabelName]model.LabelValue{ "__meta_datacenter": "london", "__meta_prometheus_job": "node", - }}, + }, + }, }}, mockTargetAllocatorResponseRaw{code: 200, data: []hTTPSDResponse{ - {Targets: []string{"localhost:9090", "10.0.10.3:9100", "10.0.10.4:9100", "10.0.10.5:9100"}, + { + Targets: []string{"localhost:9090", "10.0.10.3:9100", "10.0.10.4:9100", "10.0.10.5:9100"}, Labels: map[model.LabelName]model.LabelValue{ "__meta_datacenter": "london", "__meta_prometheus_job": "node", - }}, + }, + }, }}, }, }, diff --git a/receiver/prometheusremotewritereceiver/go.mod b/receiver/prometheusremotewritereceiver/go.mod index 10a9ec042990..e4fb5cdcdc28 100644 --- a/receiver/prometheusremotewritereceiver/go.mod +++ b/receiver/prometheusremotewritereceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/gogo/protobuf v1.3.2 github.com/golang/snappy v0.0.4 github.com/prometheus/prometheus v0.54.1 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/prometheusremotewritereceiver/go.sum b/receiver/prometheusremotewritereceiver/go.sum index 8a0d0fd87d4c..3182c2a203e1 100644 --- a/receiver/prometheusremotewritereceiver/go.sum +++ b/receiver/prometheusremotewritereceiver/go.sum @@ -400,8 +400,9 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= 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= diff --git a/receiver/pulsarreceiver/go.mod b/receiver/pulsarreceiver/go.mod index 9cffa03e9e84..845d33fa15a4 100644 --- a/receiver/pulsarreceiver/go.mod +++ b/receiver/pulsarreceiver/go.mod @@ -10,7 +10,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.114.0 github.com/openzipkin/zipkin-go v0.4.3 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configopaque v1.20.0 diff --git a/receiver/pulsarreceiver/go.sum b/receiver/pulsarreceiver/go.sum index 1ea2c2d2d4b1..a8f973e4fdf0 100644 --- a/receiver/pulsarreceiver/go.sum +++ b/receiver/pulsarreceiver/go.sum @@ -205,8 +205,8 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/purefareceiver/config_test.go b/receiver/purefareceiver/config_test.go index 5dfb36922521..4147505e4b84 100644 --- a/receiver/purefareceiver/config_test.go +++ b/receiver/purefareceiver/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/confighttp" "go.opentelemetry.io/collector/confmap/confmaptest" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefareceiver/internal/metadata" @@ -22,6 +23,8 @@ func TestLoadConfig(t *testing.T) { cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) require.NoError(t, err) + clientConfig := confighttp.NewDefaultClientConfig() + tests := []struct { id component.ID expected component.Config @@ -29,7 +32,8 @@ func TestLoadConfig(t *testing.T) { { id: component.NewID(metadata.Type), expected: &Config{ - ArrayName: "foobar.example.com", + ClientConfig: clientConfig, + ArrayName: "foobar.example.com", Settings: &Settings{ ReloadIntervals: &ReloadIntervals{ Array: 15 * time.Second, diff --git a/receiver/purefareceiver/factory.go b/receiver/purefareceiver/factory.go index 90a8c2578430..3be54df2dd55 100644 --- a/receiver/purefareceiver/factory.go +++ b/receiver/purefareceiver/factory.go @@ -29,7 +29,7 @@ func NewFactory() receiver.Factory { func createDefaultConfig() component.Config { return &Config{ ArrayName: "foobar.example.com", - ClientConfig: confighttp.ClientConfig{}, + ClientConfig: confighttp.NewDefaultClientConfig(), Settings: &Settings{ ReloadIntervals: &ReloadIntervals{ Array: 15 * time.Second, diff --git a/receiver/purefareceiver/go.mod b/receiver/purefareceiver/go.mod index 97809ae1d769..12db31a3fcfa 100644 --- a/receiver/purefareceiver/go.mod +++ b/receiver/purefareceiver/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.114.0 github.com/prometheus/common v0.60.1 github.com/prometheus/prometheus v0.54.1 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configauth v0.114.0 diff --git a/receiver/purefareceiver/go.sum b/receiver/purefareceiver/go.sum index 3128fef1aa5d..f29b35be4dcb 100644 --- a/receiver/purefareceiver/go.sum +++ b/receiver/purefareceiver/go.sum @@ -536,8 +536,9 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/purefbreceiver/go.mod b/receiver/purefbreceiver/go.mod index 4815fc065280..e1a952013ff7 100644 --- a/receiver/purefbreceiver/go.mod +++ b/receiver/purefbreceiver/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.114.0 github.com/prometheus/common v0.60.1 github.com/prometheus/prometheus v0.54.1 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configauth v0.114.0 diff --git a/receiver/purefbreceiver/go.sum b/receiver/purefbreceiver/go.sum index 3128fef1aa5d..f29b35be4dcb 100644 --- a/receiver/purefbreceiver/go.sum +++ b/receiver/purefbreceiver/go.sum @@ -536,8 +536,9 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/rabbitmqreceiver/go.mod b/receiver/rabbitmqreceiver/go.mod index f60e093dd2f6..0e6ced5052ac 100644 --- a/receiver/rabbitmqreceiver/go.mod +++ b/receiver/rabbitmqreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 diff --git a/receiver/rabbitmqreceiver/go.sum b/receiver/rabbitmqreceiver/go.sum index 118fb4c51c28..12dd3f61393d 100644 --- a/receiver/rabbitmqreceiver/go.sum +++ b/receiver/rabbitmqreceiver/go.sum @@ -60,8 +60,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/receiver/receivercreator/go.mod b/receiver/receivercreator/go.mod index f068762eb726..ffde47ed455d 100644 --- a/receiver/receivercreator/go.mod +++ b/receiver/receivercreator/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/spf13/cast v1.7.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/receivercreator/go.sum b/receiver/receivercreator/go.sum index b6f8130ddc62..0532bde71bac 100644 --- a/receiver/receivercreator/go.sum +++ b/receiver/receivercreator/go.sum @@ -105,8 +105,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/redisreceiver/go.mod b/receiver/redisreceiver/go.mod index 5986f191b717..2837f0ae7cb3 100644 --- a/receiver/redisreceiver/go.mod +++ b/receiver/redisreceiver/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/redis/go-redis/v9 v9.7.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.34.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/redisreceiver/go.sum b/receiver/redisreceiver/go.sum index d2dc5b3b4154..5cc6db6dd541 100644 --- a/receiver/redisreceiver/go.sum +++ b/receiver/redisreceiver/go.sum @@ -128,8 +128,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/riakreceiver/go.mod b/receiver/riakreceiver/go.mod index e3b7275066fe..19c43f4f119b 100644 --- a/receiver/riakreceiver/go.mod +++ b/receiver/riakreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 diff --git a/receiver/riakreceiver/go.sum b/receiver/riakreceiver/go.sum index 118fb4c51c28..12dd3f61393d 100644 --- a/receiver/riakreceiver/go.sum +++ b/receiver/riakreceiver/go.sum @@ -60,8 +60,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/receiver/saphanareceiver/go.mod b/receiver/saphanareceiver/go.mod index 5d35af22cdca..14e0fc68080f 100644 --- a/receiver/saphanareceiver/go.mod +++ b/receiver/saphanareceiver/go.mod @@ -7,7 +7,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confignet v1.20.0 diff --git a/receiver/saphanareceiver/go.sum b/receiver/saphanareceiver/go.sum index 48f711497c7c..4f8646203775 100644 --- a/receiver/saphanareceiver/go.sum +++ b/receiver/saphanareceiver/go.sum @@ -52,8 +52,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/receiver/sapmreceiver/go.mod b/receiver/sapmreceiver/go.mod index ed2283bd25e0..8e739ec67b86 100644 --- a/receiver/sapmreceiver/go.mod +++ b/receiver/sapmreceiver/go.mod @@ -10,7 +10,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.114.0 github.com/signalfx/sapm-proto v0.17.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/sapmreceiver/go.sum b/receiver/sapmreceiver/go.sum index 47eca4c7242c..65b7986cf417 100644 --- a/receiver/sapmreceiver/go.sum +++ b/receiver/sapmreceiver/go.sum @@ -70,8 +70,8 @@ github.com/signalfx/sapm-proto v0.17.0 h1:KY+9zm/yDOq6uzaguI1RmrJcWxzbkGv0zE6Gpl github.com/signalfx/sapm-proto v0.17.0/go.mod h1:c8fGx9DjGP7Hqif7g6Zy6E+BCMXK/dERFU2b3faA0gk= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.111.0 h1:D3LJTYrrK2ac94E2PXPSbVkArqxbklbCLsE4MAJQdRo= diff --git a/receiver/signalfxreceiver/go.mod b/receiver/signalfxreceiver/go.mod index 5251bfbf94a5..c5ad9d85d7d3 100644 --- a/receiver/signalfxreceiver/go.mod +++ b/receiver/signalfxreceiver/go.mod @@ -6,11 +6,12 @@ require ( github.com/gorilla/mux v1.8.1 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.114.0 github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 @@ -57,7 +58,6 @@ require ( 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.114.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.114.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.114.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.114.0 // indirect diff --git a/receiver/signalfxreceiver/go.sum b/receiver/signalfxreceiver/go.sum index 8f456cb30f85..762e6a68805c 100644 --- a/receiver/signalfxreceiver/go.sum +++ b/receiver/signalfxreceiver/go.sum @@ -95,8 +95,8 @@ 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/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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/signalfxreceiver/receiver.go b/receiver/signalfxreceiver/receiver.go index 587072e65e44..65c95fdedaa7 100644 --- a/receiver/signalfxreceiver/receiver.go +++ b/receiver/signalfxreceiver/receiver.go @@ -27,6 +27,7 @@ import ( "go.opentelemetry.io/collector/receiver/receiverhelper" "go.uber.org/zap" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/errorutil" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/signalfxreceiver/internal/metadata" @@ -195,7 +196,7 @@ func (r *sfxReceiver) readBody(ctx context.Context, resp http.ResponseWriter, re func (r *sfxReceiver) writeResponse(ctx context.Context, resp http.ResponseWriter, err error) { if err != nil { - r.failRequest(ctx, resp, http.StatusInternalServerError, errNextConsumerRespBody, err) + r.failRequest(ctx, resp, errorutil.GetHTTPStatusCodeFromError(err), errNextConsumerRespBody, err) return } diff --git a/receiver/simpleprometheusreceiver/go.mod b/receiver/simpleprometheusreceiver/go.mod index 7a6565fefe3d..9b275c905e28 100644 --- a/receiver/simpleprometheusreceiver/go.mod +++ b/receiver/simpleprometheusreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.114.0 github.com/prometheus/common v0.60.1 github.com/prometheus/prometheus v0.54.1 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confighttp v0.114.0 @@ -17,7 +17,7 @@ require ( go.opentelemetry.io/collector/receiver v0.114.0 go.opentelemetry.io/collector/receiver/receivertest v0.114.0 go.uber.org/goleak v1.3.0 - k8s.io/client-go v0.31.2 + k8s.io/client-go v0.31.3 ) require ( @@ -184,8 +184,8 @@ require ( 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.31.2 // indirect - k8s.io/apimachinery v0.31.2 // indirect + k8s.io/api v0.31.3 // indirect + k8s.io/apimachinery v0.31.3 // indirect k8s.io/klog/v2 v2.130.1 // indirect k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect diff --git a/receiver/simpleprometheusreceiver/go.sum b/receiver/simpleprometheusreceiver/go.sum index b1482fa549d1..6be5372a4a9f 100644 --- a/receiver/simpleprometheusreceiver/go.sum +++ b/receiver/simpleprometheusreceiver/go.sum @@ -536,8 +536,9 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= @@ -1086,12 +1087,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= -k8s.io/api v0.31.2 h1:3wLBbL5Uom/8Zy98GRPXpJ254nEFpl+hwndmk9RwmL0= -k8s.io/api v0.31.2/go.mod h1:bWmGvrGPssSK1ljmLzd3pwCQ9MgoTsRCuK35u6SygUk= -k8s.io/apimachinery v0.31.2 h1:i4vUt2hPK56W6mlT7Ry+AO8eEsyxMD1U44NR22CLTYw= -k8s.io/apimachinery v0.31.2/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= -k8s.io/client-go v0.31.2 h1:Y2F4dxU5d3AQj+ybwSMqQnpZH9F30//1ObxOKlTI9yc= -k8s.io/client-go v0.31.2/go.mod h1:NPa74jSVR/+eez2dFsEIHNa+3o09vtNaWwWwb1qSxSs= +k8s.io/api v0.31.3 h1:umzm5o8lFbdN/hIXbrK9oRpOproJO62CV1zqxXrLgk8= +k8s.io/api v0.31.3/go.mod h1:UJrkIp9pnMOI9K2nlL6vwpxRzzEX5sWgn8kGQe92kCE= +k8s.io/apimachinery v0.31.3 h1:6l0WhcYgasZ/wk9ktLq5vLaoXJJr5ts6lkaQzgeYPq4= +k8s.io/apimachinery v0.31.3/go.mod h1:rsPdaZJfTfLsNJSQzNHQvYoTmxhoOEofxtOsF3rtsMo= +k8s.io/client-go v0.31.3 h1:CAlZuM+PH2cm+86LOBemaJI/lQ5linJ6UFxKX/SoG+4= +k8s.io/client-go v0.31.3/go.mod h1:2CgjPUTpv3fE5dNygAr2NcM8nhHzXvxB8KL5gYc3kJs= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= k8s.io/klog/v2 v2.130.1/go.mod h1:3Jpz1GvMt720eyJH1ckRHK1EDfpxISzJ7I9OYgaDtPE= k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 h1:BZqlfIlq5YbRMFko6/PM7FjZpUb45WallggurYhKGag= diff --git a/receiver/skywalkingreceiver/go.mod b/receiver/skywalkingreceiver/go.mod index fcc16bd70e70..b9a8eff4d39c 100644 --- a/receiver/skywalkingreceiver/go.mod +++ b/receiver/skywalkingreceiver/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/skywalking v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/skywalkingreceiver/go.sum b/receiver/skywalkingreceiver/go.sum index c6d17d839d4b..98a1036812d4 100644 --- a/receiver/skywalkingreceiver/go.sum +++ b/receiver/skywalkingreceiver/go.sum @@ -109,8 +109,8 @@ github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasO 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/snmpreceiver/go.mod b/receiver/snmpreceiver/go.mod index b580b0aa0416..9b59623c53ba 100644 --- a/receiver/snmpreceiver/go.mod +++ b/receiver/snmpreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/gosnmp/gosnmp v1.38.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.34.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/snmpreceiver/go.sum b/receiver/snmpreceiver/go.sum index d632910e549b..6ee7b7983ab0 100644 --- a/receiver/snmpreceiver/go.sum +++ b/receiver/snmpreceiver/go.sum @@ -156,8 +156,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/snowflakereceiver/go.mod b/receiver/snowflakereceiver/go.mod index b71e17f7822b..4541160b3e62 100644 --- a/receiver/snowflakereceiver/go.mod +++ b/receiver/snowflakereceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/snowflakedb/gosnowflake v1.12.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configopaque v1.20.0 diff --git a/receiver/snowflakereceiver/go.sum b/receiver/snowflakereceiver/go.sum index c441ec988a71..c734d1f5ddd2 100644 --- a/receiver/snowflakereceiver/go.sum +++ b/receiver/snowflakereceiver/go.sum @@ -155,8 +155,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/solacereceiver/go.mod b/receiver/solacereceiver/go.mod index 41c924eabf8d..0235cdaf6d3a 100644 --- a/receiver/solacereceiver/go.mod +++ b/receiver/solacereceiver/go.mod @@ -7,7 +7,7 @@ go 1.22.0 require ( github.com/Azure/go-amqp v1.2.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configopaque v1.20.0 diff --git a/receiver/solacereceiver/go.sum b/receiver/solacereceiver/go.sum index ed9f8cd27825..4895ec833040 100644 --- a/receiver/solacereceiver/go.sum +++ b/receiver/solacereceiver/go.sum @@ -50,8 +50,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/receiver/splunkenterprisereceiver/go.mod b/receiver/splunkenterprisereceiver/go.mod index 69634969c3d7..ed4cf00629a4 100644 --- a/receiver/splunkenterprisereceiver/go.mod +++ b/receiver/splunkenterprisereceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/google/go-cmp v0.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configauth v0.114.0 diff --git a/receiver/splunkenterprisereceiver/go.sum b/receiver/splunkenterprisereceiver/go.sum index e673553f6d77..859812a4d221 100644 --- a/receiver/splunkenterprisereceiver/go.sum +++ b/receiver/splunkenterprisereceiver/go.sum @@ -58,8 +58,8 @@ github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/receiver/splunkhecreceiver/go.mod b/receiver/splunkhecreceiver/go.mod index 2110a4a47e5d..2d3d46743a1f 100644 --- a/receiver/splunkhecreceiver/go.mod +++ b/receiver/splunkhecreceiver/go.mod @@ -12,7 +12,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/splunkhecreceiver/go.sum b/receiver/splunkhecreceiver/go.sum index 15f5725f8301..11123bf77077 100644 --- a/receiver/splunkhecreceiver/go.sum +++ b/receiver/splunkhecreceiver/go.sum @@ -122,8 +122,8 @@ 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/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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/sqlqueryreceiver/go.mod b/receiver/sqlqueryreceiver/go.mod index 0a329898b018..d0e888b7c7e4 100644 --- a/receiver/sqlqueryreceiver/go.mod +++ b/receiver/sqlqueryreceiver/go.mod @@ -9,7 +9,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.34.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/receiver/sqlqueryreceiver/go.sum b/receiver/sqlqueryreceiver/go.sum index 866b46765d59..b4979b2b6d03 100644 --- a/receiver/sqlqueryreceiver/go.sum +++ b/receiver/sqlqueryreceiver/go.sum @@ -273,8 +273,8 @@ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/sqlserverreceiver/go.mod b/receiver/sqlserverreceiver/go.mod index 7dc7eba46a5a..7e3cbcfa30f4 100644 --- a/receiver/sqlserverreceiver/go.mod +++ b/receiver/sqlserverreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configopaque v1.20.0 diff --git a/receiver/sqlserverreceiver/go.sum b/receiver/sqlserverreceiver/go.sum index 638ac95715aa..3289a9ebcb73 100644 --- a/receiver/sqlserverreceiver/go.sum +++ b/receiver/sqlserverreceiver/go.sum @@ -193,8 +193,8 @@ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/sshcheckreceiver/go.mod b/receiver/sshcheckreceiver/go.mod index 96dd5861cb68..421dcf7010f3 100644 --- a/receiver/sshcheckreceiver/go.mod +++ b/receiver/sshcheckreceiver/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/pkg/sftp v1.13.7 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/receiver/sshcheckreceiver/go.sum b/receiver/sshcheckreceiver/go.sum index f47068fa07ac..2c1255831833 100644 --- a/receiver/sshcheckreceiver/go.sum +++ b/receiver/sshcheckreceiver/go.sum @@ -53,8 +53,8 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/statsdreceiver/go.mod b/receiver/statsdreceiver/go.mod index df0ed96afb5e..2aefaef28048 100644 --- a/receiver/statsdreceiver/go.mod +++ b/receiver/statsdreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/lightstep/go-expohisto v1.0.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/client v1.20.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 diff --git a/receiver/statsdreceiver/go.sum b/receiver/statsdreceiver/go.sum index bf08794e06dc..896ea6a3a583 100644 --- a/receiver/statsdreceiver/go.sum +++ b/receiver/statsdreceiver/go.sum @@ -48,8 +48,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/receiver/syslogreceiver/go.mod b/receiver/syslogreceiver/go.mod index 0410d5cfe11a..0ddd16903f0d 100644 --- a/receiver/syslogreceiver/go.mod +++ b/receiver/syslogreceiver/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 go.opentelemetry.io/collector/consumer v0.114.0 // indirect diff --git a/receiver/syslogreceiver/go.sum b/receiver/syslogreceiver/go.sum index 3a4451939a4c..2582a7161983 100644 --- a/receiver/syslogreceiver/go.sum +++ b/receiver/syslogreceiver/go.sum @@ -69,8 +69,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/systemdreceiver/go.mod b/receiver/systemdreceiver/go.mod index c7c4ceb4cfeb..cc92bc8e9dee 100644 --- a/receiver/systemdreceiver/go.mod +++ b/receiver/systemdreceiver/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/system go 1.22.0 require ( - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/receiver/systemdreceiver/go.sum b/receiver/systemdreceiver/go.sum index 51cad49846ae..a59eac1f7b9c 100644 --- a/receiver/systemdreceiver/go.sum +++ b/receiver/systemdreceiver/go.sum @@ -44,8 +44,8 @@ github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjR 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/receiver/tcplogreceiver/go.mod b/receiver/tcplogreceiver/go.mod index 45435508d598..72cc3d7c4436 100644 --- a/receiver/tcplogreceiver/go.mod +++ b/receiver/tcplogreceiver/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 go.opentelemetry.io/collector/consumer v0.114.0 // indirect diff --git a/receiver/tcplogreceiver/go.sum b/receiver/tcplogreceiver/go.sum index 3a4451939a4c..2582a7161983 100644 --- a/receiver/tcplogreceiver/go.sum +++ b/receiver/tcplogreceiver/go.sum @@ -69,8 +69,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/tlscheckreceiver/go.mod b/receiver/tlscheckreceiver/go.mod index 9bee14dbef3f..3457115c4bcd 100644 --- a/receiver/tlscheckreceiver/go.mod +++ b/receiver/tlscheckreceiver/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/google/go-cmp v0.6.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/receiver/tlscheckreceiver/go.sum b/receiver/tlscheckreceiver/go.sum index 8dc3def840f0..a3bd6bbd919a 100644 --- a/receiver/tlscheckreceiver/go.sum +++ b/receiver/tlscheckreceiver/go.sum @@ -44,8 +44,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/receiver/udplogreceiver/go.mod b/receiver/udplogreceiver/go.mod index 7797b76ff372..d2b68d275432 100644 --- a/receiver/udplogreceiver/go.mod +++ b/receiver/udplogreceiver/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 go.opentelemetry.io/collector/consumer v0.114.0 // indirect diff --git a/receiver/udplogreceiver/go.sum b/receiver/udplogreceiver/go.sum index f92fbb0647e3..09e9847b6738 100644 --- a/receiver/udplogreceiver/go.sum +++ b/receiver/udplogreceiver/go.sum @@ -65,8 +65,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/vcenterreceiver/go.mod b/receiver/vcenterreceiver/go.mod index 1fbb26735e53..487ce575d160 100644 --- a/receiver/vcenterreceiver/go.mod +++ b/receiver/vcenterreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/vmware/govmomi v0.46.1 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/vcenterreceiver/go.sum b/receiver/vcenterreceiver/go.sum index 3df00d7a9486..3c17e78a7e92 100644 --- a/receiver/vcenterreceiver/go.sum +++ b/receiver/vcenterreceiver/go.sum @@ -128,8 +128,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/receiver/wavefrontreceiver/go.mod b/receiver/wavefrontreceiver/go.mod index b76ffc6e64c8..4a7eeb5551d9 100644 --- a/receiver/wavefrontreceiver/go.mod +++ b/receiver/wavefrontreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/collectd v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/confignet v1.20.0 diff --git a/receiver/wavefrontreceiver/go.sum b/receiver/wavefrontreceiver/go.sum index 2d551cec0aaa..c33283143bb9 100644 --- a/receiver/wavefrontreceiver/go.sum +++ b/receiver/wavefrontreceiver/go.sum @@ -46,8 +46,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/receiver/webhookeventreceiver/go.mod b/receiver/webhookeventreceiver/go.mod index 8f869df30dde..7ff90a63b33e 100644 --- a/receiver/webhookeventreceiver/go.mod +++ b/receiver/webhookeventreceiver/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/json-iterator/go v1.1.12 github.com/julienschmidt/httprouter v1.3.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/webhookeventreceiver/go.sum b/receiver/webhookeventreceiver/go.sum index 9594cabdf5da..0d90e83d269b 100644 --- a/receiver/webhookeventreceiver/go.sum +++ b/receiver/webhookeventreceiver/go.sum @@ -58,8 +58,8 @@ github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/client v1.20.0 h1:o60wPcj5nLtaRenF+1E5p4QXFS3TDL6vHlw+GOon3rg= diff --git a/receiver/windowseventlogreceiver/go.mod b/receiver/windowseventlogreceiver/go.mod index 4f1871ae95f6..0f298dd6bdb5 100644 --- a/receiver/windowseventlogreceiver/go.mod +++ b/receiver/windowseventlogreceiver/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 go.opentelemetry.io/collector/consumer v0.114.0 diff --git a/receiver/windowseventlogreceiver/go.sum b/receiver/windowseventlogreceiver/go.sum index f92fbb0647e3..09e9847b6738 100644 --- a/receiver/windowseventlogreceiver/go.sum +++ b/receiver/windowseventlogreceiver/go.sum @@ -65,8 +65,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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= diff --git a/receiver/windowsperfcountersreceiver/README.md b/receiver/windowsperfcountersreceiver/README.md index 5a726b9fc759..674573f891c1 100644 --- a/receiver/windowsperfcountersreceiver/README.md +++ b/receiver/windowsperfcountersreceiver/README.md @@ -142,7 +142,7 @@ receivers: attributes: state: active - object: "Processor" - instances: [1, 2] + instances: ["1", "2"] counters: - name: "% Idle Time" metric: processor.time diff --git a/receiver/windowsperfcountersreceiver/go.mod b/receiver/windowsperfcountersreceiver/go.mod index c2c1f7596281..60c88cb6be4c 100644 --- a/receiver/windowsperfcountersreceiver/go.mod +++ b/receiver/windowsperfcountersreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/confmap v1.20.0 diff --git a/receiver/windowsperfcountersreceiver/go.sum b/receiver/windowsperfcountersreceiver/go.sum index 2339dccc57e5..834684884fdf 100644 --- a/receiver/windowsperfcountersreceiver/go.sum +++ b/receiver/windowsperfcountersreceiver/go.sum @@ -46,8 +46,8 @@ github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.114.0 h1:SVGbm5LvHGSTEDv7p92oPuBgK5tuiWR82I9+LL4TtBE= diff --git a/receiver/zipkinreceiver/go.mod b/receiver/zipkinreceiver/go.mod index 210eb5741668..032aae768d0d 100644 --- a/receiver/zipkinreceiver/go.mod +++ b/receiver/zipkinreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.114.0 github.com/openzipkin/zipkin-go v0.4.3 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componentstatus v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/zipkinreceiver/go.sum b/receiver/zipkinreceiver/go.sum index 4d0967669af2..c57756c9a819 100644 --- a/receiver/zipkinreceiver/go.sum +++ b/receiver/zipkinreceiver/go.sum @@ -66,8 +66,8 @@ github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= 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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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.111.0 h1:D3LJTYrrK2ac94E2PXPSbVkArqxbklbCLsE4MAJQdRo= diff --git a/receiver/zookeeperreceiver/go.mod b/receiver/zookeeperreceiver/go.mod index b74e27e27415..c295b65fe2d6 100644 --- a/receiver/zookeeperreceiver/go.mod +++ b/receiver/zookeeperreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.114.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.114.0 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 github.com/testcontainers/testcontainers-go v0.34.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 diff --git a/receiver/zookeeperreceiver/go.sum b/receiver/zookeeperreceiver/go.sum index 1d5f2eb04b96..5716402a131c 100644 --- a/receiver/zookeeperreceiver/go.sum +++ b/receiver/zookeeperreceiver/go.sum @@ -120,8 +120,8 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/testcontainers/testcontainers-go v0.34.0 h1:5fbgF0vIN5u+nD3IWabQwRybuB4GY8G2HHgCkbMzMHo= github.com/testcontainers/testcontainers-go v0.34.0/go.mod h1:6P/kMkQe8yqPHfPWNulFGdFHTD8HB2vLq/231xY2iPQ= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= diff --git a/renovate.json b/renovate.json index 6be78207f2b9..74d57112f1c1 100644 --- a/renovate.json +++ b/renovate.json @@ -109,7 +109,7 @@ ], "ignoreDeps": [ "github.com/DataDog/datadog-agent/pkg/trace/exportable", - "github.com/datadog/datadog-api-client-go/v2" + "github.com/DataDog/datadog-api-client-go" ], "prConcurrentLimit": 200, "suppressNotifications": ["prEditedNotification"] diff --git a/reports/distributions/contrib.yaml b/reports/distributions/contrib.yaml index 2d8cbb868933..7f93791eccb8 100644 --- a/reports/distributions/contrib.yaml +++ b/reports/distributions/contrib.yaml @@ -62,6 +62,7 @@ components: - awsproxy - basicauth - bearertokenauth + - cgroupruntime - db_storage - docker_observer - ecs_observer diff --git a/testbed/go.mod b/testbed/go.mod index 864904c520bd..063aa2052dd9 100644 --- a/testbed/go.mod +++ b/testbed/go.mod @@ -33,7 +33,7 @@ require ( github.com/prometheus/common v0.60.1 github.com/prometheus/prometheus v0.54.1 github.com/shirou/gopsutil/v4 v4.24.10 - github.com/stretchr/testify v1.9.0 + github.com/stretchr/testify v1.10.0 go.opentelemetry.io/collector/component v0.114.0 go.opentelemetry.io/collector/component/componenttest v0.114.0 go.opentelemetry.io/collector/config/configcompression v1.20.0 diff --git a/testbed/go.sum b/testbed/go.sum index cfb91d95563f..4b3f1da4bb39 100644 --- a/testbed/go.sum +++ b/testbed/go.sum @@ -689,8 +689,9 @@ 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.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/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.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/tidwall/gjson v1.10.2 h1:APbLGOM0rrEkd8WBw9C24nllro4ajFuJu0Sc9hRz8Bo= diff --git a/versions.yaml b/versions.yaml index dddba38d63ca..d976116bcf02 100644 --- a/versions.yaml +++ b/versions.yaml @@ -21,6 +21,7 @@ module-sets: - github.com/open-telemetry/opentelemetry-collector-contrib/connector/roundrobinconnector - 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/signaltometricsconnector - github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector - github.com/open-telemetry/opentelemetry-collector-contrib/connector/sumconnector - github.com/open-telemetry/opentelemetry-collector-contrib/examples/demo/client @@ -77,6 +78,7 @@ module-sets: - github.com/open-telemetry/opentelemetry-collector-contrib/extension/awsproxy - github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension - github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension + - github.com/open-telemetry/opentelemetry-collector-contrib/extension/cgroupruntimeextension - github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding - github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/avrologencodingextension - github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding/jaegerencodingextension @@ -223,6 +225,7 @@ module-sets: - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/haproxyreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver + - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/huaweicloudcesreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/httpcheckreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/iisreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/influxdbreceiver @@ -242,6 +245,7 @@ module-sets: - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mysqlreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/namedpipereceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nginxreceiver + - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/netflowreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nsxtreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/ntpreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver