diff --git a/.chloggen/35028-fix-scan-behavior.yaml b/.chloggen/35028-fix-scan-behavior.yaml new file mode 100644 index 000000000000..34e0fa1dfe9b --- /dev/null +++ b/.chloggen/35028-fix-scan-behavior.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: webhookeventreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Fixed a bug where request bodies containing newline characters caused the results to split into multiple log entries + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [35028] + +# (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/datadogreceiver-metrics-alpha.yaml b/.chloggen/datadogreceiver-metrics-alpha.yaml new file mode 100644 index 000000000000..44c076140f4a --- /dev/null +++ b/.chloggen/datadogreceiver-metrics-alpha.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: datadogreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Move receiver's metrics stability to alpha. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [18278] + +# (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/elasticsearchexporter_drop-non-delta-histogram-exponential-histogram.yaml b/.chloggen/elasticsearchexporter_drop-non-delta-histogram-exponential-histogram.yaml new file mode 100644 index 000000000000..ae93d7a2c3f9 --- /dev/null +++ b/.chloggen/elasticsearchexporter_drop-non-delta-histogram-exponential-histogram.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: elasticsearchexporter + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Drop cumulative temporality histogram and exponential histogram + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [35442] + +# (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: Cumulative temporality histogram and exponential histogram are not supported by Elasticsearch. Use cumulativetodeltaprocessor to convert cumulative temporality to delta temporality. + +# 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/elasticsearchexporter_mapping-hint.yaml b/.chloggen/elasticsearchexporter_mapping-hint.yaml new file mode 100644 index 000000000000..3fa4662df777 --- /dev/null +++ b/.chloggen/elasticsearchexporter_mapping-hint.yaml @@ -0,0 +1,30 @@ +# 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: elasticsearchexporter + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Implement elasticsearch.mapping.hints attribute handling for data points in OTel mapping mode + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [35479] + +# (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: + elasticsearch.mapping.hints takes a slice of strings. + `_doc_count` enables emitting `_doc_count` for the document. + `aggregate_metric_double` causes histogram or exponential histogram to be emitted as aggregate_metric_double. + +# 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/elasticsearchexporter_otel-mode-doc-count.yaml b/.chloggen/elasticsearchexporter_receiver-based-routing.yaml similarity index 89% rename from .chloggen/elasticsearchexporter_otel-mode-doc-count.yaml rename to .chloggen/elasticsearchexporter_receiver-based-routing.yaml index 12668e7baa1f..85101276c2b1 100644 --- a/.chloggen/elasticsearchexporter_otel-mode-doc-count.yaml +++ b/.chloggen/elasticsearchexporter_receiver-based-routing.yaml @@ -1,16 +1,16 @@ # Use this changelog template to create an entry for release notes. # One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' -change_type: enhancement +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: Emit _doc_count for metric documents in OTel mode when data point attribute _doc_count is true +note: Implement receiver-based routing under *_dynamic_index config # Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. -issues: [35348] +issues: [34246] # (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. diff --git a/.chloggen/feat_opampsupervisor-start-stop-empty-confmap.yaml b/.chloggen/feat_opampsupervisor-start-stop-empty-confmap.yaml new file mode 100644 index 000000000000..2405e0f53480 --- /dev/null +++ b/.chloggen/feat_opampsupervisor-start-stop-empty-confmap.yaml @@ -0,0 +1,13 @@ +# 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: opampsupervisor + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Skip executing the collector if no config is provided + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [33680] diff --git a/.chloggen/fix-opampsupervisor-tls-settings.yaml b/.chloggen/fix-opampsupervisor-tls-settings.yaml new file mode 100644 index 000000000000..028f427f9e28 --- /dev/null +++ b/.chloggen/fix-opampsupervisor-tls-settings.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: opampsupervisor + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Only use TLS config when connecting to OpAMP server if using `wss` or `https` protocols. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [35283] + +# (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/hostmetricsreceiver-mute-all-errors.yaml b/.chloggen/hostmetricsreceiver-mute-all-errors.yaml new file mode 100644 index 000000000000..585928d258af --- /dev/null +++ b/.chloggen/hostmetricsreceiver-mute-all-errors.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: hostmetricsreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add ability to mute all errors (mainly due to access rights) coming from process scraper of the hostmetricsreceiver + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [20435] + +# (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/kubeletstats_featuregate_metrics.yaml b/.chloggen/kubeletstats_featuregate_metrics.yaml new file mode 100644 index 000000000000..9c1fed91a6b1 --- /dev/null +++ b/.chloggen/kubeletstats_featuregate_metrics.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: kubeletstats + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Introduce feature gate for deprecation of container.cpu.utilization, k8s.pod.cpu.utilization and k8s.node.cpu.utilization metrics + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [35139] + +# (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/metricsgeneration_metric2_0.yaml b/.chloggen/metricsgeneration_metric2_0.yaml new file mode 100644 index 000000000000..fbb040071ddb --- /dev/null +++ b/.chloggen/metricsgeneration_metric2_0.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: metricsgenerationprocessor + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Generate metrics even when the second metric's value is 0 + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [35533] + +# (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/metricsgeneration_relax_type_req.yaml b/.chloggen/metricsgeneration_relax_type_req.yaml new file mode 100644 index 000000000000..cd8ba247c435 --- /dev/null +++ b/.chloggen/metricsgeneration_relax_type_req.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: metricsgenerationprocessor + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Allow metric calculations to be done on sum metrics + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [35428] + +# (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/ottl-add-element-xml.yaml b/.chloggen/ottl-add-element-xml.yaml new file mode 100644 index 000000000000..f74f7c3fd3c1 --- /dev/null +++ b/.chloggen/ottl-add-element-xml.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: Add InsertXML Converter + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [35436] + +# (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/ottl-tokeyvaluestring.yaml b/.chloggen/ottl-tokeyvaluestring.yaml new file mode 100644 index 000000000000..a762cff62296 --- /dev/null +++ b/.chloggen/ottl-tokeyvaluestring.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: Add ToKeyValueString Converter + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [35334] + +# (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/prw-receiver.yaml b/.chloggen/prw-receiver.yaml new file mode 100644 index 000000000000..9d7448027ea9 --- /dev/null +++ b/.chloggen/prw-receiver.yaml @@ -0,0 +1,28 @@ +# 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: receiver/prometheusremotewrite + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: | + Add a new receiver for Prometheus Remote Write. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [33782] + +# (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/refactor-config-in-opampsupervisor.yaml b/.chloggen/refactor-config-in-opampsupervisor.yaml new file mode 100644 index 000000000000..d31cfcdc700d --- /dev/null +++ b/.chloggen/refactor-config-in-opampsupervisor.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: opampsupervisor + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Pass config structure instead of file path when using NewSupervisor function + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [34379] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [api] diff --git a/.chloggen/remove_exclusion_rule.yaml b/.chloggen/remove_exclusion_rule.yaml new file mode 100644 index 000000000000..e70d4e3ef527 --- /dev/null +++ b/.chloggen/remove_exclusion_rule.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: signalfxexporter + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Do not exclude the metric `container.memory.working_set` + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [35475] + +# (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/skip_if_geo_not_found.yaml b/.chloggen/skip_if_geo_not_found.yaml new file mode 100644 index 000000000000..58f84671e390 --- /dev/null +++ b/.chloggen/skip_if_geo_not_found.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: geoipprocessor + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: No longer return an error when geo metadata is not found by a provider. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [35047] + +# (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/sqlqueryreceiver-fix-ts-tracking-column.yaml b/.chloggen/sqlqueryreceiver-fix-ts-tracking-column.yaml new file mode 100644 index 000000000000..73d0823dfe83 --- /dev/null +++ b/.chloggen/sqlqueryreceiver-fix-ts-tracking-column.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: sqlqueryreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Fix reprocessing of logs when tracking_column type is timestamp + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [35194] + +# (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/sqlserver_computer_rattr.yaml b/.chloggen/sqlserver_computer_rattr.yaml new file mode 100644 index 000000000000..8bf4ab24527a --- /dev/null +++ b/.chloggen/sqlserver_computer_rattr.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: sqlserverreceiver + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add computer name resource attribute to relevant metrics + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [35040] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 46dcbb6d9b13..70a5e095cb32 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -271,6 +271,7 @@ receiver/otlpjsonfilereceiver/ @open-teleme receiver/podmanreceiver/ @open-telemetry/collector-contrib-approvers @rogercoll receiver/postgresqlreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski receiver/prometheusreceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @dashpole +receiver/prometheusremotewritereceiver/ @open-telemetry/collector-contrib-approvers @dashpole @ArthurSens receiver/pulsarreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @dao-jun receiver/purefareceiver/ @open-telemetry/collector-contrib-approvers @jpkrohling @dgoscn @chrroberts-pure receiver/purefbreceiver/ @open-telemetry/collector-contrib-approvers @jpkrohling @dgoscn @chrroberts-pure diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 68722fe2e2d7..b705cbecfb53 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -266,6 +266,7 @@ body: - receiver/podman - receiver/postgresql - receiver/prometheus + - receiver/prometheusremotewrite - receiver/pulsar - receiver/purefa - receiver/purefb diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index f603b779352a..8ec681fa0a67 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -260,6 +260,7 @@ body: - receiver/podman - receiver/postgresql - receiver/prometheus + - receiver/prometheusremotewrite - receiver/pulsar - receiver/purefa - receiver/purefb diff --git a/.github/ISSUE_TEMPLATE/other.yaml b/.github/ISSUE_TEMPLATE/other.yaml index 6807b3cd69f1..b0098510b798 100644 --- a/.github/ISSUE_TEMPLATE/other.yaml +++ b/.github/ISSUE_TEMPLATE/other.yaml @@ -260,6 +260,7 @@ body: - receiver/podman - receiver/postgresql - receiver/prometheus + - receiver/prometheusremotewrite - receiver/pulsar - receiver/purefa - receiver/purefb diff --git a/.github/ISSUE_TEMPLATE/unmaintained.yaml b/.github/ISSUE_TEMPLATE/unmaintained.yaml index 4fcf7319ced2..df65436ba755 100644 --- a/.github/ISSUE_TEMPLATE/unmaintained.yaml +++ b/.github/ISSUE_TEMPLATE/unmaintained.yaml @@ -265,6 +265,7 @@ body: - receiver/podman - receiver/postgresql - receiver/prometheus + - receiver/prometheusremotewrite - receiver/pulsar - receiver/purefa - receiver/purefb diff --git a/.github/auto_assign.yml b/.github/auto_assign.yml index d6c34b2edfee..1c1d4a61817b 100644 --- a/.github/auto_assign.yml +++ b/.github/auto_assign.yml @@ -23,8 +23,7 @@ assigneeGroups: - codeboten - djaglowski - dmitryax - # Unavailable 2024-08-12 -- 2024-08-23, 2024-09-06 -- 2024-09-30 - # - evan-bradley + - evan-bradley - jpkrohling - MovieStoreGuy - mx-psi diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index e14ab4dff770..6a19f81815af 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -338,7 +338,7 @@ jobs: merge-multiple: true pattern: coverage-artifacts-* - name: Upload coverage report - uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # 4.5.0 + uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # 4.6.0 env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/Makefile b/Makefile index 09d8da8962d8..ce2c0ea77df7 100644 --- a/Makefile +++ b/Makefile @@ -118,6 +118,10 @@ gogci: gotidy: $(MAKE) $(FOR_GROUP_TARGET) TARGET="tidy" +.PHONY: remove-toolchain +remove-toolchain: + $(MAKE) $(FOR_GROUP_TARGET) TARGET="toolchain" + .PHONY: gomoddownload gomoddownload: $(MAKE) $(FOR_GROUP_TARGET) TARGET="moddownload" @@ -404,11 +408,12 @@ update-otel:$(MULTIMOD) $(MULTIMOD) sync -s=true -o ../opentelemetry-collector -m beta --commit-hash $(OTEL_VERSION) git add . && git commit -s -m "[chore] multimod update beta modules" ; \ $(MAKE) gotidy - $(call updatehelper,$(CORE_VERSIONS),$(GOMOD),./cmd/otelcontribcol/builder-config.yaml) + $(call updatehelper,$(CORE_VERSIONS),$(GOMOD),./cmd/otelcontribcol/builder-config.yaml) $(call updatehelper,$(CORE_VERSIONS),$(GOMOD),./cmd/oteltestbedcol/builder-config.yaml) $(MAKE) genotelcontribcol $(MAKE) genoteltestbedcol $(MAKE) oteltestbedcol + $(MAKE) remove-toolchain .PHONY: otel-from-tree otel-from-tree: diff --git a/Makefile.Common b/Makefile.Common index dd43ce8758ab..d3a16de3b865 100644 --- a/Makefile.Common +++ b/Makefile.Common @@ -211,6 +211,10 @@ tidy: rm -fr go.sum $(GOCMD) mod tidy -compat=1.22.0 +.PHONY: toolchain +toolchain: + $(GOCMD) get toolchain@none + .PHONY: misspell misspell: $(TOOLS_BIN_DIR)/misspell @echo "running $(MISSPELL)" diff --git a/cmd/githubgen/allowlist.txt b/cmd/githubgen/allowlist.txt index 949c4fd14624..0aad99b3ac17 100644 --- a/cmd/githubgen/allowlist.txt +++ b/cmd/githubgen/allowlist.txt @@ -22,4 +22,5 @@ tomasmota m1rp jriguera abhishek-at-cloudwerx -joker-star-l \ No newline at end of file +joker-star-l +ArthurSens \ No newline at end of file diff --git a/cmd/opampsupervisor/e2e_test.go b/cmd/opampsupervisor/e2e_test.go index 9316e8ffde8a..4ec5034f785e 100644 --- a/cmd/opampsupervisor/e2e_test.go +++ b/cmd/opampsupervisor/e2e_test.go @@ -154,7 +154,11 @@ func newUnstartedOpAMPServer(t *testing.T, connectingCallback onConnectingFuncFa func newSupervisor(t *testing.T, configType string, extraConfigData map[string]string) *supervisor.Supervisor { cfgFile := getSupervisorConfig(t, configType, extraConfigData) - s, err := supervisor.NewSupervisor(zap.NewNop(), cfgFile.Name()) + + cfg, err := config.Load(cfgFile.Name()) + require.NoError(t, err) + + s, err := supervisor.NewSupervisor(zap.NewNop(), cfg) require.NoError(t, err) return s @@ -345,20 +349,15 @@ func TestSupervisorStartsWithNoOpAMPServer(t *testing.T) { require.Nil(t, s.Start()) defer s.Shutdown() - // Verify the collector is running by checking the metrics endpoint - require.Eventually(t, func() bool { - resp, err := http.DefaultClient.Get("http://localhost:12345") - if err != nil { - t.Logf("Failed agent healthcheck request: %s", err) - return false - } - require.NoError(t, resp.Body.Close()) - if resp.StatusCode >= 300 || resp.StatusCode < 200 { - t.Logf("Got non-2xx status code: %d", resp.StatusCode) - return false - } - return true - }, 3*time.Second, 100*time.Millisecond) + // Verify the collector is not running after 250 ms by checking the healthcheck endpoint + time.Sleep(250 * time.Millisecond) + _, err := http.DefaultClient.Get("http://localhost:12345") + + if runtime.GOOS != "windows" { + require.ErrorContains(t, err, "connection refused") + } else { + require.ErrorContains(t, err, "No connection could be made") + } // Start the server and wait for the supervisor to connect server.start() @@ -1262,6 +1261,99 @@ func TestSupervisorWritesAgentFilesToStorageDir(t *testing.T) { require.FileExists(t, filepath.Join(storageDir, "effective.yaml")) } +func TestSupervisorStopsAgentProcessWithEmptyConfigMap(t *testing.T) { + agentCfgChan := make(chan string, 1) + server := newOpAMPServer( + t, + defaultConnectingHandler, + server.ConnectionCallbacksStruct{ + OnMessageFunc: func(_ context.Context, _ types.Connection, message *protobufs.AgentToServer) *protobufs.ServerToAgent { + if message.EffectiveConfig != nil { + config := message.EffectiveConfig.ConfigMap.ConfigMap[""] + if config != nil { + select { + case agentCfgChan <- string(config.Body): + default: + } + } + } + + return &protobufs.ServerToAgent{} + }, + }) + + s := newSupervisor(t, "healthcheck_port", map[string]string{ + "url": server.addr, + "healthcheck_port": "12345", + }) + + require.Nil(t, s.Start()) + defer s.Shutdown() + + waitForSupervisorConnection(server.supervisorConnected, true) + + cfg, hash, _, _ := createSimplePipelineCollectorConf(t) + + server.sendToSupervisor(&protobufs.ServerToAgent{ + RemoteConfig: &protobufs.AgentRemoteConfig{ + Config: &protobufs.AgentConfigMap{ + ConfigMap: map[string]*protobufs.AgentConfigFile{ + "": {Body: cfg.Bytes()}, + }, + }, + ConfigHash: hash, + }, + }) + + select { + case <-agentCfgChan: + case <-time.After(1 * time.Second): + require.FailNow(t, "timed out waitng for agent to report its initial config") + } + + // Use health check endpoint to determine if the collector is actually running + require.Eventually(t, func() bool { + resp, err := http.DefaultClient.Get("http://localhost:12345") + if err != nil { + t.Logf("Failed agent healthcheck request: %s", err) + return false + } + require.NoError(t, resp.Body.Close()) + if resp.StatusCode >= 300 || resp.StatusCode < 200 { + t.Logf("Got non-2xx status code: %d", resp.StatusCode) + return false + } + return true + }, 3*time.Second, 100*time.Millisecond) + + // Send empty config + emptyHash := sha256.Sum256([]byte{}) + server.sendToSupervisor(&protobufs.ServerToAgent{ + RemoteConfig: &protobufs.AgentRemoteConfig{ + Config: &protobufs.AgentConfigMap{ + ConfigMap: map[string]*protobufs.AgentConfigFile{}, + }, + ConfigHash: emptyHash[:], + }, + }) + + select { + case <-agentCfgChan: + case <-time.After(1 * time.Second): + require.FailNow(t, "timed out waitng for agent to report its noop config") + } + + // Verify the collector is not running after 250 ms by checking the healthcheck endpoint + time.Sleep(250 * time.Millisecond) + _, err := http.DefaultClient.Get("http://localhost:12345") + if runtime.GOOS != "windows" { + require.ErrorContains(t, err, "connection refused") + } else { + require.ErrorContains(t, err, "No connection could be made") + } + +} + func findRandomPort() (int, error) { l, err := net.Listen("tcp", "localhost:0") diff --git a/cmd/opampsupervisor/main.go b/cmd/opampsupervisor/main.go index 3e58ee4730a7..137d2d37c3a2 100644 --- a/cmd/opampsupervisor/main.go +++ b/cmd/opampsupervisor/main.go @@ -11,6 +11,7 @@ import ( "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/opampsupervisor/supervisor" + "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/opampsupervisor/supervisor/config" ) func main() { @@ -19,7 +20,14 @@ func main() { logger, _ := zap.NewDevelopment() - supervisor, err := supervisor.NewSupervisor(logger, *configFlag) + cfg, err := config.Load(*configFlag) + if err != nil { + logger.Error(err.Error()) + os.Exit(-1) + return + } + + supervisor, err := supervisor.NewSupervisor(logger, cfg) if err != nil { logger.Error(err.Error()) os.Exit(-1) diff --git a/cmd/opampsupervisor/specification/README.md b/cmd/opampsupervisor/specification/README.md index e30dfe883471..a45d7b6d38d1 100644 --- a/cmd/opampsupervisor/specification/README.md +++ b/cmd/opampsupervisor/specification/README.md @@ -166,9 +166,9 @@ agent: ### Operation When OpAMP Server is Unavailable When the supervisor cannot connect to the OpAMP server, the collector will -be run with the last known configuration, or with a "noop" configuration -if no previous configuration is persisted. The supervisor will continually -attempt to reconnect to the OpAMP server with exponential backoff. +be run with the last known configuration if a previous configuration is persisted. +If no previous configuration has been persisted, the collector does not run. +The supervisor will continually attempt to reconnect to the OpAMP server with exponential backoff. ### Executing Collector @@ -204,6 +204,10 @@ Configuration*](https://github.com/open-telemetry/opamp-spec/blob/main/specifica from the OpAMP Backend, merges it with an optional local config file and writes it to the Collector's config file, then restarts the Collector. +If the remote configuration from the OpAMP Backend contains an empty config map, +the collector will be stopped and will not be run again until a non-empty config map +is received from the OpAMP Backend. + In the future once config file watching is implemented the Collector can reload the config without the need for the Supervisor to restart the Collector process. @@ -244,13 +248,13 @@ configuration. To overcome this problem the Supervisor starts the Collector with an "noop" configuration that collects nothing but allows the opamp extension to be started. The "noop" configuration is a single pipeline -with an OTLP receiver that listens on a random port and a debug -exporter, and the opamp extension. The purpose of the "noop" -configuration is to make sure the Collector starts and the opamp -extension communicates with the Supervisor. +with an nop receiver, a nop exporter, and the opamp extension. +The purpose of the "noop" configuration is to make sure the Collector starts +and the opamp extension communicates with the Supervisor. The Collector is stopped +after the AgentDescription is received from the Collector. Once the initial Collector launch is successful and the remote -configuration is received by the Supervisor the Supervisor restarts the +configuration is received by the Supervisor the Supervisor starts the Collector with the new config. The new config is also cached by the Supervisor in a local file, so that subsequent restarts no longer need to start the Collector using the "noop" configuration. Caching of the diff --git a/cmd/opampsupervisor/supervisor/config/config.go b/cmd/opampsupervisor/supervisor/config/config.go index 3954da8cb79b..a260410f9c95 100644 --- a/cmd/opampsupervisor/supervisor/config/config.go +++ b/cmd/opampsupervisor/supervisor/config/config.go @@ -13,6 +13,9 @@ import ( "runtime" "time" + "github.com/knadh/koanf/parsers/yaml" + "github.com/knadh/koanf/providers/file" + "github.com/knadh/koanf/v2" "github.com/open-telemetry/opamp-go/protobufs" "go.opentelemetry.io/collector/config/configtls" ) @@ -25,6 +28,33 @@ type Supervisor struct { Storage Storage `mapstructure:"storage"` } +// Load loads the Supervisor config from a file. +func Load(configFile string) (Supervisor, error) { + if configFile == "" { + return Supervisor{}, errors.New("path to config file cannot be empty") + } + + k := koanf.New("::") + if err := k.Load(file.Provider(configFile), yaml.Parser()); err != nil { + return Supervisor{}, err + } + + decodeConf := koanf.UnmarshalConf{ + Tag: "mapstructure", + } + + cfg := DefaultSupervisor() + if err := k.UnmarshalWithConf("", &cfg, decodeConf); err != nil { + return Supervisor{}, fmt.Errorf("cannot parse %s: %w", configFile, err) + } + + if err := cfg.Validate(); err != nil { + return Supervisor{}, fmt.Errorf("cannot validate supervisor config %s: %w", configFile, err) + } + + return cfg, nil +} + func (s Supervisor) Validate() error { if err := s.Server.Validate(); err != nil { return err diff --git a/cmd/opampsupervisor/supervisor/supervisor.go b/cmd/opampsupervisor/supervisor/supervisor.go index 6fa55948f0fd..d96a1c8fbc93 100644 --- a/cmd/opampsupervisor/supervisor/supervisor.go +++ b/cmd/opampsupervisor/supervisor/supervisor.go @@ -6,11 +6,13 @@ package supervisor import ( "bytes" "context" + "crypto/tls" _ "embed" "errors" "fmt" "net" "net/http" + "net/url" "os" "path/filepath" "sort" @@ -23,7 +25,6 @@ import ( "github.com/google/uuid" "github.com/knadh/koanf/maps" "github.com/knadh/koanf/parsers/yaml" - "github.com/knadh/koanf/providers/file" "github.com/knadh/koanf/providers/rawbytes" "github.com/knadh/koanf/v2" "github.com/open-telemetry/opamp-go/client" @@ -66,6 +67,17 @@ const ( const maxBufferedCustomMessages = 10 +type configState struct { + // Supervisor-assembled config to be given to the Collector. + mergedConfig string + // true if the server provided configmap was empty + configMapIsEmpty bool +} + +func (c *configState) equal(other *configState) bool { + return other.mergedConfig == c.mergedConfig && other.configMapIsEmpty == c.configMapIsEmpty +} + // Supervisor implements supervising of OpenTelemetry Collector and uses OpAMPClient // to work with an OpAMP Server. type Supervisor struct { @@ -106,8 +118,8 @@ type Supervisor struct { // will listen on for health check requests from the Supervisor. agentHealthCheckEndpoint string - // Supervisor-assembled config to be given to the Collector. - mergedConfig *atomic.Value + // Internal config state for agent use. See the configState struct for more details. + cfgState *atomic.Value // Final effective config of the Collector. effectiveConfig *atomic.Value @@ -136,13 +148,13 @@ type Supervisor struct { opampServerPort int } -func NewSupervisor(logger *zap.Logger, configFile string) (*Supervisor, error) { +func NewSupervisor(logger *zap.Logger, cfg config.Supervisor) (*Supervisor, error) { s := &Supervisor{ logger: logger, pidProvider: defaultPIDProvider{}, hasNewConfig: make(chan struct{}, 1), agentConfigOwnMetricsSection: &atomic.Value{}, - mergedConfig: &atomic.Value{}, + cfgState: &atomic.Value{}, effectiveConfig: &atomic.Value{}, agentDescription: &atomic.Value{}, doneChan: make(chan struct{}), @@ -153,14 +165,12 @@ func NewSupervisor(logger *zap.Logger, configFile string) (*Supervisor, error) { return nil, err } - if err := s.loadConfig(configFile); err != nil { - return nil, fmt.Errorf("error loading config: %w", err) - } - - if err := s.config.Validate(); err != nil { + if err := cfg.Validate(); err != nil { return nil, fmt.Errorf("error validating config: %w", err) } + s.config = cfg + if err := os.MkdirAll(s.config.Storage.Directory, 0700); err != nil { return nil, fmt.Errorf("error creating storage dir: %w", err) } @@ -248,28 +258,6 @@ func (s *Supervisor) createTemplates() error { return nil } -func (s *Supervisor) loadConfig(configFile string) error { - if configFile == "" { - return errors.New("path to config file cannot be empty") - } - - k := koanf.New("::") - if err := k.Load(file.Provider(configFile), yaml.Parser()); err != nil { - return err - } - - decodeConf := koanf.UnmarshalConf{ - Tag: "mapstructure", - } - - s.config = config.DefaultSupervisor() - if err := k.UnmarshalWithConf("", &s.config, decodeConf); err != nil { - return fmt.Errorf("cannot parse %v: %w", configFile, err) - } - - return nil -} - // getBootstrapInfo obtains the Collector's agent description by // starting a Collector with a specific config that only starts // an OpAMP extension, obtains the agent description, then @@ -391,9 +379,17 @@ func (s *Supervisor) startOpAMP() error { func (s *Supervisor) startOpAMPClient() error { s.opampClient = client.NewWebSocket(newLoggerFromZap(s.logger)) - tlsConfig, err := s.config.Server.TLSSetting.LoadTLSConfig(context.Background()) + // determine if we need to load a TLS config or not + var tlsConfig *tls.Config + parsedURL, err := url.Parse(s.config.Server.Endpoint) if err != nil { - return err + return fmt.Errorf("parse server endpoint: %w", err) + } + if parsedURL.Scheme == "wss" || parsedURL.Scheme == "https" { + tlsConfig, err = s.config.Server.TLSSetting.LoadTLSConfig(context.Background()) + if err != nil { + return err + } } s.logger.Debug("Connecting to OpAMP server...", zap.String("endpoint", s.config.Server.Endpoint), zap.Any("headers", s.config.Server.Headers)) @@ -461,11 +457,17 @@ func (s *Supervisor) startOpAMPClient() error { func (s *Supervisor) startOpAMPServer() error { s.opampServer = server.New(newLoggerFromZap(s.logger)) + var err error + s.opampServerPort, err = s.findRandomPort() + if err != nil { + return err + } + s.logger.Debug("Starting OpAMP server...") connected := &atomic.Bool{} - err := s.opampServer.Start(flattenedSettings{ + err = s.opampServer.Start(flattenedSettings{ endpoint: fmt.Sprintf("localhost:%d", s.opampServerPort), onConnectingFunc: func(_ *http.Request) (bool, int) { // Only allow one agent to be connected the this server at a time. @@ -802,8 +804,8 @@ func (s *Supervisor) loadAndWriteInitialMergedConfig() error { } // write the initial merged config to disk - cfg := s.mergedConfig.Load().(string) - if err := os.WriteFile(s.agentConfigFilePath(), []byte(cfg), 0600); err != nil { + cfgState := s.cfgState.Load().(*configState) + if err := os.WriteFile(s.agentConfigFilePath(), []byte(cfgState.mergedConfig), 0600); err != nil { s.logger.Error("Failed to write agent config.", zap.Error(err)) } @@ -815,9 +817,11 @@ func (s *Supervisor) loadAndWriteInitialMergedConfig() error { func (s *Supervisor) createEffectiveConfigMsg() *protobufs.EffectiveConfig { cfgStr, ok := s.effectiveConfig.Load().(string) if !ok { - cfgStr, ok = s.mergedConfig.Load().(string) + cfgState, ok := s.cfgState.Load().(*configState) if !ok { cfgStr = "" + } else { + cfgStr = cfgState.mergedConfig } } @@ -879,7 +883,11 @@ func (s *Supervisor) setupOwnMetrics(_ context.Context, settings *protobufs.Tele func (s *Supervisor) composeMergedConfig(config *protobufs.AgentRemoteConfig) (configChanged bool, err error) { var k = koanf.New("::") - if c := config.GetConfig(); c != nil { + configMapIsEmpty := len(config.GetConfig().GetConfigMap()) == 0 + + if !configMapIsEmpty { + c := config.GetConfig() + // Sort to make sure the order of merging is stable. var names []string for name := range c.ConfigMap { @@ -948,11 +956,16 @@ func (s *Supervisor) composeMergedConfig(config *protobufs.AgentRemoteConfig) (c } // Check if supervisor's merged config is changed. - newMergedConfig := string(newMergedConfigBytes) + + newConfigState := &configState{ + mergedConfig: string(newMergedConfigBytes), + configMapIsEmpty: configMapIsEmpty, + } + configChanged = false - oldConfig := s.mergedConfig.Swap(newMergedConfig) - if oldConfig == nil || oldConfig.(string) != newMergedConfig { + oldConfigState := s.cfgState.Swap(newConfigState) + if oldConfigState == nil || !oldConfigState.(*configState).equal(newConfigState) { s.logger.Debug("Merged config changed.") configChanged = true } @@ -972,6 +985,12 @@ func (s *Supervisor) handleRestartCommand() error { } func (s *Supervisor) startAgent() { + if s.cfgState.Load().(*configState).configMapIsEmpty { + // Don't start the agent if there is no config to run + s.logger.Info("No config present, not starting agent.") + return + } + err := s.commander.Start(context.Background()) if err != nil { s.logger.Error("Cannot start the agent", zap.Error(err)) @@ -1113,14 +1132,14 @@ func (s *Supervisor) runAgentProcess() { func (s *Supervisor) stopAgentApplyConfig() { s.logger.Debug("Stopping the agent to apply new config") - cfg := s.mergedConfig.Load().(string) + 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(cfg), 0600); err != nil { + if err := os.WriteFile(s.agentConfigFilePath(), []byte(cfgState.mergedConfig), 0600); err != nil { s.logger.Error("Failed to write agent config.", zap.Error(err)) } } diff --git a/cmd/opampsupervisor/supervisor/supervisor_test.go b/cmd/opampsupervisor/supervisor/supervisor_test.go index 9f66bbf71578..6b1a100b1010 100644 --- a/cmd/opampsupervisor/supervisor/supervisor_test.go +++ b/cmd/opampsupervisor/supervisor/supervisor_test.go @@ -6,8 +6,11 @@ package supervisor import ( "bytes" "context" + "fmt" "net" "os" + "path/filepath" + "runtime" "sync/atomic" "testing" "time" @@ -23,6 +26,75 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/cmd/opampsupervisor/supervisor/config" ) +func setupSupervisorConfig(t *testing.T) config.Supervisor { + t.Helper() + + tmpDir, err := os.MkdirTemp(os.TempDir(), "*") + require.NoError(t, err) + + executablePath := filepath.Join(tmpDir, "binary") + err = os.WriteFile(executablePath, []byte{}, 0o600) + require.NoError(t, err) + + configuration := ` +server: + endpoint: ws://localhost/v1/opamp + tls: + insecure: true + +capabilities: + reports_effective_config: true + reports_own_metrics: true + reports_health: true + accepts_remote_config: true + reports_remote_config: true + accepts_restart_command: true + +storage: + directory: %s + +agent: + executable: %s +` + configuration = fmt.Sprintf(configuration, filepath.Join(tmpDir, "storage"), executablePath) + + cfgPath := filepath.Join(tmpDir, "config.yaml") + err = os.WriteFile(cfgPath, []byte(configuration), 0o600) + require.NoError(t, err) + + cfg, err := config.Load(cfgPath) + require.NoError(t, err) + + t.Cleanup(func() { + require.NoError(t, os.Chmod(tmpDir, 0o700)) + require.NoError(t, os.RemoveAll(tmpDir)) + }) + + return cfg +} + +func Test_NewSupervisor(t *testing.T) { + cfg := setupSupervisorConfig(t) + supervisor, err := NewSupervisor(zap.L(), cfg) + require.NoError(t, err) + require.NotNil(t, supervisor) +} + +func Test_NewSupervisorFailedStorageCreation(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("Skipping test on Windows because chmod doesn't affect permissions on Windows, so this test won't work.") + } + cfg := setupSupervisorConfig(t) + + dir := filepath.Dir(cfg.Storage.Directory) + require.NoError(t, os.Chmod(dir, 0o500)) + + supervisor, err := NewSupervisor(zap.L(), cfg) + require.Error(t, err) + require.ErrorContains(t, err, "error creating storage dir") + require.Nil(t, supervisor) +} + func Test_composeEffectiveConfig(t *testing.T) { acceptsRemoteConfig := true s := Supervisor{ @@ -32,7 +104,7 @@ func Test_composeEffectiveConfig(t *testing.T) { pidProvider: staticPIDProvider(1234), hasNewConfig: make(chan struct{}, 1), agentConfigOwnMetricsSection: &atomic.Value{}, - mergedConfig: &atomic.Value{}, + cfgState: &atomic.Value{}, agentHealthCheckEndpoint: "localhost:8000", } @@ -87,7 +159,7 @@ service: expectedConfig = bytes.ReplaceAll(expectedConfig, []byte("\r\n"), []byte("\n")) require.True(t, configChanged) - require.Equal(t, string(expectedConfig), s.mergedConfig.Load().(string)) + require.Equal(t, string(expectedConfig), s.cfgState.Load().(*configState).mergedConfig) } func Test_onMessage(t *testing.T) { @@ -104,7 +176,7 @@ func Test_onMessage(t *testing.T) { persistentState: &persistentState{InstanceID: initialID}, agentDescription: agentDesc, agentConfigOwnMetricsSection: &atomic.Value{}, - mergedConfig: &atomic.Value{}, + cfgState: &atomic.Value{}, effectiveConfig: &atomic.Value{}, agentHealthCheckEndpoint: "localhost:8000", opampClient: client.NewHTTP(newLoggerFromZap(zap.NewNop())), @@ -133,7 +205,7 @@ func Test_onMessage(t *testing.T) { persistentState: &persistentState{InstanceID: testUUID}, agentDescription: agentDesc, agentConfigOwnMetricsSection: &atomic.Value{}, - mergedConfig: &atomic.Value{}, + cfgState: &atomic.Value{}, effectiveConfig: &atomic.Value{}, agentHealthCheckEndpoint: "localhost:8000", } @@ -179,7 +251,7 @@ func Test_onMessage(t *testing.T) { hasNewConfig: make(chan struct{}, 1), persistentState: &persistentState{InstanceID: testUUID}, agentConfigOwnMetricsSection: &atomic.Value{}, - mergedConfig: &atomic.Value{}, + cfgState: &atomic.Value{}, effectiveConfig: &atomic.Value{}, agentConn: agentConnAtomic, agentHealthCheckEndpoint: "localhost:8000", @@ -260,7 +332,7 @@ func Test_onMessage(t *testing.T) { persistentState: &persistentState{InstanceID: initialID}, agentDescription: agentDesc, agentConfigOwnMetricsSection: &atomic.Value{}, - mergedConfig: &atomic.Value{}, + cfgState: &atomic.Value{}, effectiveConfig: &atomic.Value{}, agentHealthCheckEndpoint: "localhost:8000", opampClient: client.NewHTTP(newLoggerFromZap(zap.NewNop())), @@ -286,10 +358,11 @@ func Test_onMessage(t *testing.T) { }) require.Equal(t, newID, s.persistentState.InstanceID) - t.Log(s.mergedConfig.Load()) - require.Contains(t, s.mergedConfig.Load(), "prometheus/own_metrics") - require.Contains(t, s.mergedConfig.Load(), newID.String()) - require.Contains(t, s.mergedConfig.Load(), "runtime.type: test") + t.Log(s.cfgState.Load()) + mergedCfg := s.cfgState.Load().(*configState).mergedConfig + require.Contains(t, mergedCfg, "prometheus/own_metrics") + require.Contains(t, mergedCfg, newID.String()) + require.Contains(t, mergedCfg, "runtime.type: test") }) } diff --git a/cmd/opampsupervisor/testdata/supervisor/supervisor_accepts_conn.yaml b/cmd/opampsupervisor/testdata/supervisor/supervisor_accepts_conn.yaml index 6fba120fffc6..9caaea49296b 100644 --- a/cmd/opampsupervisor/testdata/supervisor/supervisor_accepts_conn.yaml +++ b/cmd/opampsupervisor/testdata/supervisor/supervisor_accepts_conn.yaml @@ -1,7 +1,5 @@ server: endpoint: ws://{{.url}}/v1/opamp - tls: - insecure: true capabilities: reports_effective_config: true diff --git a/cmd/opampsupervisor/testdata/supervisor/supervisor_agent_description.yaml b/cmd/opampsupervisor/testdata/supervisor/supervisor_agent_description.yaml index 404fa3bb500b..a87e3edd3bb0 100644 --- a/cmd/opampsupervisor/testdata/supervisor/supervisor_agent_description.yaml +++ b/cmd/opampsupervisor/testdata/supervisor/supervisor_agent_description.yaml @@ -1,7 +1,5 @@ server: endpoint: ws://{{.url}}/v1/opamp - tls: - insecure: true capabilities: reports_effective_config: true diff --git a/cmd/opampsupervisor/testdata/supervisor/supervisor_basic.yaml b/cmd/opampsupervisor/testdata/supervisor/supervisor_basic.yaml index f713be57c24b..bfe228f86e32 100644 --- a/cmd/opampsupervisor/testdata/supervisor/supervisor_basic.yaml +++ b/cmd/opampsupervisor/testdata/supervisor/supervisor_basic.yaml @@ -1,7 +1,5 @@ server: endpoint: ws://{{.url}}/v1/opamp - tls: - insecure: true capabilities: reports_effective_config: true diff --git a/cmd/opampsupervisor/testdata/supervisor/supervisor_healthcheck_port.yaml b/cmd/opampsupervisor/testdata/supervisor/supervisor_healthcheck_port.yaml index 08c6b6bceb88..b9d226058e4a 100644 --- a/cmd/opampsupervisor/testdata/supervisor/supervisor_healthcheck_port.yaml +++ b/cmd/opampsupervisor/testdata/supervisor/supervisor_healthcheck_port.yaml @@ -1,7 +1,5 @@ server: endpoint: ws://{{.url}}/v1/opamp - tls: - insecure: true capabilities: reports_effective_config: true diff --git a/cmd/opampsupervisor/testdata/supervisor/supervisor_nocap.yaml b/cmd/opampsupervisor/testdata/supervisor/supervisor_nocap.yaml index 34c45f4d752c..cab98dd081e4 100644 --- a/cmd/opampsupervisor/testdata/supervisor/supervisor_nocap.yaml +++ b/cmd/opampsupervisor/testdata/supervisor/supervisor_nocap.yaml @@ -1,7 +1,5 @@ server: endpoint: ws://{{.url}}/v1/opamp - tls: - insecure: true capabilities: reports_effective_config: false diff --git a/cmd/opampsupervisor/testdata/supervisor/supervisor_persistence.yaml b/cmd/opampsupervisor/testdata/supervisor/supervisor_persistence.yaml index 600e0c19f7bb..723f3fb98902 100644 --- a/cmd/opampsupervisor/testdata/supervisor/supervisor_persistence.yaml +++ b/cmd/opampsupervisor/testdata/supervisor/supervisor_persistence.yaml @@ -1,7 +1,5 @@ server: endpoint: ws://{{.url}}/v1/opamp - tls: - insecure: true capabilities: reports_effective_config: true diff --git a/cmd/otelcontribcol/builder-config.yaml b/cmd/otelcontribcol/builder-config.yaml index 1f74a1afc813..26b7618f78a5 100644 --- a/cmd/otelcontribcol/builder-config.yaml +++ b/cmd/otelcontribcol/builder-config.yaml @@ -466,7 +466,6 @@ replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector => ../../connector/servicegraphconnector - github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector => ../../connector/spanmetricsconnector - github.com/openshift/api v3.9.0+incompatible => github.com/openshift/api v0.0.0-20180801171038-322a19404e37 - - github.com/outcaste-io/ristretto v0.2.0 => github.com/outcaste-io/ristretto v0.2.1 - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure => ../../pkg/translator/azure - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/skywalking => ../../pkg/translator/skywalking - github.com/open-telemetry/opentelemetry-collector-contrib/internal/collectd => ../../internal/collectd diff --git a/cmd/otelcontribcol/go.mod b/cmd/otelcontribcol/go.mod index 612b46ff0d1a..290ff4b9351b 100644 --- a/cmd/otelcontribcol/go.mod +++ b/cmd/otelcontribcol/go.mod @@ -239,15 +239,15 @@ require ( bitbucket.org/atlassian/go-asap/v2 v2.9.0 // indirect cel.dev/expr v0.16.0 // indirect cloud.google.com/go v0.115.1 // indirect - cloud.google.com/go/auth v0.9.4 // indirect + cloud.google.com/go/auth v0.9.5 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect cloud.google.com/go/compute/metadata v0.5.2 // indirect - cloud.google.com/go/iam v1.2.0 // indirect + cloud.google.com/go/iam v1.2.1 // indirect cloud.google.com/go/logging v1.11.0 // indirect - cloud.google.com/go/longrunning v0.6.0 // indirect + cloud.google.com/go/longrunning v0.6.1 // indirect cloud.google.com/go/monitoring v1.21.1 // indirect cloud.google.com/go/pubsub v1.43.0 // indirect - cloud.google.com/go/spanner v1.67.0 // indirect + cloud.google.com/go/spanner v1.68.0 // indirect cloud.google.com/go/trace v1.11.0 // indirect code.cloudfoundry.org/clock v0.0.0-20180518195852-02e53af36e6c // indirect code.cloudfoundry.org/go-diodes v0.0.0-20211115184647-b584dd5df32c // indirect @@ -271,7 +271,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.4.1 // indirect github.com/Azure/azure-storage-queue-go v0.0.0-20230531184854-c06a8eff66fe // indirect - github.com/Azure/go-amqp v1.1.0 // indirect + github.com/Azure/go-amqp v1.2.0 // indirect github.com/Azure/go-autorest v14.2.0+incompatible // indirect github.com/Azure/go-autorest/autorest v0.11.29 // indirect github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect @@ -284,7 +284,7 @@ require ( github.com/ClickHouse/ch-go v0.61.5 // indirect github.com/ClickHouse/clickhouse-go/v2 v2.29.0 // indirect github.com/Code-Hex/go-generics-cache v1.5.1 // indirect - github.com/DataDog/agent-payload/v5 v5.0.132 // indirect + github.com/DataDog/agent-payload/v5 v5.0.133 // indirect github.com/DataDog/datadog-agent/comp/core/config v0.57.1 // indirect github.com/DataDog/datadog-agent/comp/core/flare/builder v0.57.1 // indirect github.com/DataDog/datadog-agent/comp/core/flare/types v0.57.1 // indirect @@ -383,34 +383,34 @@ require ( github.com/apache/arrow/go/v15 v15.0.0 // indirect github.com/apache/arrow/go/v16 v16.1.0 // indirect github.com/apache/arrow/go/v17 v17.0.0 // indirect - github.com/apache/pulsar-client-go v0.13.1 // indirect + github.com/apache/pulsar-client-go v0.14.0 // indirect github.com/apache/thrift v0.21.0 // indirect github.com/ardielle/ardielle-go v1.5.2 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/armon/go-radix v1.0.0 // indirect github.com/aws/aws-sdk-go v1.55.5 // indirect - github.com/aws/aws-sdk-go-v2 v1.30.5 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.4 // indirect - github.com/aws/aws-sdk-go-v2/config v1.27.35 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.33 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13 // indirect + github.com/aws/aws-sdk-go-v2 v1.31.0 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.5 // indirect + github.com/aws/aws-sdk-go-v2/config v1.27.39 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.37 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 // indirect github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.17 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.19 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.17 // indirect - github.com/aws/aws-sdk-go-v2/service/kinesis v1.29.8 // indirect - github.com/aws/aws-sdk-go-v2/service/s3 v1.61.3 // indirect - github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.9 // indirect - github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.31.8 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.22.8 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.8 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.30.8 // indirect - github.com/aws/smithy-go v1.20.4 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.18 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.20 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.18 // indirect + github.com/aws/aws-sdk-go-v2/service/kinesis v1.31.2 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.63.3 // indirect + github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.33.3 // indirect + github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.32.3 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.23.3 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.31.3 // indirect + github.com/aws/smithy-go v1.21.0 // indirect github.com/axiomhq/hyperloglog v0.0.0-20230201085229-3ddf4bad03dc // indirect github.com/bahlo/generic-list-go v0.2.0 // indirect github.com/benbjohnson/clock v1.3.5 // indirect @@ -428,7 +428,7 @@ require ( github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect github.com/cilium/ebpf v0.11.0 // indirect github.com/cloudfoundry-incubator/uaago v0.0.0-20190307164349-8136b7bbe76e // indirect - github.com/cncf/xds/go v0.0.0-20240723142845-024c85f92f20 // indirect + github.com/cncf/xds/go v0.0.0-20240822171458-6449f94b4d59 // indirect github.com/containerd/cgroups/v3 v3.0.3 // indirect github.com/containerd/console v1.0.3 // indirect github.com/containerd/ttrpc v1.2.4 // indirect @@ -451,6 +451,7 @@ require ( github.com/eapache/go-resiliency v1.7.0 // indirect github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect github.com/eapache/queue v1.1.0 // indirect + github.com/ebitengine/purego v0.8.0 // indirect github.com/elastic/elastic-transport-go/v8 v8.6.0 // indirect github.com/elastic/go-docappender/v2 v2.3.0 // indirect github.com/elastic/go-elasticsearch/v7 v7.17.10 // indirect @@ -490,7 +491,7 @@ require ( github.com/go-zookeeper/zk v1.0.3 // indirect github.com/gobwas/glob v0.2.3 // indirect github.com/goccy/go-json v0.10.3 // indirect - github.com/gocql/gocql v1.6.0 // indirect + github.com/gocql/gocql v1.7.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/godbus/dbus/v5 v5.0.6 // indirect github.com/gofrs/uuid v4.4.0+incompatible // indirect @@ -669,7 +670,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/skywalking v0.110.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.110.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.110.0 // indirect - github.com/open-telemetry/otel-arrow v0.26.0 // indirect + github.com/open-telemetry/otel-arrow v0.27.0 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.1.0 // indirect github.com/opencontainers/runc v1.1.14 // indirect @@ -687,7 +688,7 @@ require ( github.com/paulmach/orb v0.11.1 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.2.2 // indirect - github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 // indirect + github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c // indirect github.com/pierrec/lz4 v2.6.1+incompatible // indirect github.com/pierrec/lz4/v4 v4.1.21 // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect @@ -700,7 +701,7 @@ require ( github.com/prometheus-community/windows_exporter v0.27.2 // indirect github.com/prometheus/client_golang v1.20.4 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.59.1 // indirect + github.com/prometheus/common v0.60.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/prometheus/prometheus v0.54.1 // indirect @@ -718,7 +719,7 @@ require ( github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect github.com/segmentio/asm v1.2.0 // indirect github.com/shirou/gopsutil/v3 v3.24.5 // indirect - github.com/shirou/gopsutil/v4 v4.24.8 // indirect + github.com/shirou/gopsutil/v4 v4.24.9 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/shopspring/decimal v1.4.0 // indirect github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 // indirect @@ -740,14 +741,14 @@ require ( github.com/stretchr/objx v0.5.2 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1009 // indirect + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1015 // indirect github.com/tg123/go-htpasswd v1.2.2 // indirect github.com/tidwall/gjson v1.17.3 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/tidwall/tinylru v1.1.0 // indirect github.com/tidwall/wal v1.1.7 // indirect - github.com/tinylib/msgp v1.2.1 // indirect + github.com/tinylib/msgp v1.2.2 // indirect github.com/tklauser/go-sysconf v0.3.14 // indirect github.com/tklauser/numcpus v0.8.0 // indirect github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 // indirect @@ -773,7 +774,7 @@ require ( go.elastic.co/fastjson v1.3.0 // indirect go.etcd.io/bbolt v1.3.11 // indirect go.mongodb.org/atlas v0.37.0 // indirect - go.mongodb.org/mongo-driver v1.17.0 // indirect + go.mongodb.org/mongo-driver v1.17.1 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/collector v0.110.0 // indirect go.opentelemetry.io/collector/client v1.16.0 // indirect @@ -810,6 +811,7 @@ require ( go.opentelemetry.io/collector/semconv v0.110.0 // indirect go.opentelemetry.io/collector/service v0.110.0 // indirect go.opentelemetry.io/contrib/config v0.10.0 // indirect + go.opentelemetry.io/contrib/detectors/gcp v1.29.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.55.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 // indirect go.opentelemetry.io/contrib/propagators/b3 v1.30.0 // indirect @@ -847,13 +849,13 @@ require ( golang.org/x/text v0.18.0 // indirect golang.org/x/time v0.6.0 // indirect golang.org/x/tools v0.24.0 // indirect - golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 // indirect + golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect gonum.org/v1/gonum v0.15.1 // indirect - google.golang.org/api v0.198.0 // indirect + google.golang.org/api v0.199.0 // indirect google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/grpc v1.67.0 // indirect + google.golang.org/grpc v1.67.1 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect @@ -1322,8 +1324,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/connector/span replace github.com/openshift/api v3.9.0+incompatible => github.com/openshift/api v0.0.0-20180801171038-322a19404e37 -replace github.com/outcaste-io/ristretto v0.2.0 => github.com/outcaste-io/ristretto v0.2.1 - replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure => ../../pkg/translator/azure replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/skywalking => ../../pkg/translator/skywalking diff --git a/cmd/otelcontribcol/go.sum b/cmd/otelcontribcol/go.sum index e7bc35c36b1b..44e7b5dc3e2a 100644 --- a/cmd/otelcontribcol/go.sum +++ b/cmd/otelcontribcol/go.sum @@ -103,8 +103,8 @@ cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVo cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= -cloud.google.com/go/auth v0.9.4 h1:DxF7imbEbiFu9+zdKC6cKBko1e8XeJnipNqIbWZ+kDI= -cloud.google.com/go/auth v0.9.4/go.mod h1:SHia8n6//Ya940F1rLimhJCjjx7KE17t0ctFEci3HkA= +cloud.google.com/go/auth v0.9.5 h1:4CTn43Eynw40aFVr3GpPqsQponx2jv0BQpjvajsbbzw= +cloud.google.com/go/auth v0.9.5/go.mod h1:Xo0n7n66eHyOWWCnitop6870Ilwo3PiZyodVkkH1xWM= cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= @@ -321,8 +321,8 @@ cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGE cloud.google.com/go/iam v0.11.0/go.mod h1:9PiLDanza5D+oWFZiH1uG+RnRCfEGKoyl6yo4cgWZGY= cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= -cloud.google.com/go/iam v1.2.0 h1:kZKMKVNk/IsSSc/udOb83K0hL/Yh/Gcqpz+oAkoIFN8= -cloud.google.com/go/iam v1.2.0/go.mod h1:zITGuWgsLZxd8OwAlX+eMFgZDXzBm7icj1PVTYG766Q= +cloud.google.com/go/iam v1.2.1 h1:QFct02HRb7H12J/3utj0qf5tobFh9V4vR6h9eX5EBRU= +cloud.google.com/go/iam v1.2.1/go.mod h1:3VUIJDPpwT6p/amXRC5GY8fCCh70lxPygguVtI0Z4/g= cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= @@ -357,8 +357,8 @@ cloud.google.com/go/logging v1.11.0/go.mod h1:5LDiJC/RxTt+fHc1LAt20R9TKiUTReDg6R cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= -cloud.google.com/go/longrunning v0.6.0 h1:mM1ZmaNsQsnb+5n1DNPeL0KwQd9jQRqSqSDEkBZr+aI= -cloud.google.com/go/longrunning v0.6.0/go.mod h1:uHzSZqW89h7/pasCWNYdUpwGz3PcVWhrWupreVPYLts= +cloud.google.com/go/longrunning v0.6.1 h1:lOLTFxYpr8hcRtcwWir5ITh1PAKUD/sG2lKrTSYjyMc= +cloud.google.com/go/longrunning v0.6.1/go.mod h1:nHISoOZpBcmlwbJmiVk5oDRz0qG/ZxPynEGs1iZ79s0= cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= @@ -532,8 +532,8 @@ cloud.google.com/go/shell v1.6.0/go.mod h1:oHO8QACS90luWgxP3N9iZVuEiSF84zNyLytb+ cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= cloud.google.com/go/spanner v1.44.0/go.mod h1:G8XIgYdOK+Fbcpbs7p2fiprDw4CaZX63whnSMLVBxjk= cloud.google.com/go/spanner v1.45.0/go.mod h1:FIws5LowYz8YAE1J8fOS7DJup8ff7xJeetWEo5REA2M= -cloud.google.com/go/spanner v1.67.0 h1:h8xfobxh5lQu4qJVMPH+wSiyU+ZM6ZTxRNqGeu9iIVA= -cloud.google.com/go/spanner v1.67.0/go.mod h1:Um+TNmxfcCHqNCKid4rmAMvoe/Iu1vdz6UfxJ9GPxRQ= +cloud.google.com/go/spanner v1.68.0 h1:54nL8lEUj5A6frSGnL9VPmHDYbV5UwVkK8fbdnZyDCs= +cloud.google.com/go/spanner v1.68.0/go.mod h1:X5T0XftydYp0K1adeJQDJtdWpbrOeJ7wHecM4tK6FiE= cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= @@ -678,8 +678,8 @@ github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.4.1 h1:cf+OIKbkmMHBaC3u7 github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.4.1/go.mod h1:ap1dmS6vQKJxSMNiGJcq4QuUQkOynyD93gLw6MDF7ek= github.com/Azure/azure-storage-queue-go v0.0.0-20230531184854-c06a8eff66fe h1:HGuouUM1533rBXmMtR7qh5pYNSSjUZG90b/MgJAnb/A= github.com/Azure/azure-storage-queue-go v0.0.0-20230531184854-c06a8eff66fe/go.mod h1:K6am8mT+5iFXgingS9LUc7TmbsW6XBw3nxaRyaMyWc8= -github.com/Azure/go-amqp v1.1.0 h1:XUhx5f4lZFVf6LQc5kBUFECW0iJW9VLxKCYrBeGwl0U= -github.com/Azure/go-amqp v1.1.0/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE= +github.com/Azure/go-amqp v1.2.0 h1:NNyfN3/cRszWzMvjmm64yaPZDHX/2DJkowv8Ub9y01I= +github.com/Azure/go-amqp v1.2.0/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/Azure/go-autorest v14.2.0+incompatible h1:V5VMDjClD3GiElqLWO7mz2MxNAK/vTfRHdAubSIPRgs= @@ -721,8 +721,8 @@ github.com/Code-Hex/go-generics-cache v1.5.1 h1:6vhZGc5M7Y/YD8cIUcY8kcuQLB4cHR7U github.com/Code-Hex/go-generics-cache v1.5.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU= github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU= -github.com/DataDog/agent-payload/v5 v5.0.132 h1:F9wy+iyAgN2QmkEsOlPp3RrQ4vOb4T6k3BXhjSpELS4= -github.com/DataDog/agent-payload/v5 v5.0.132/go.mod h1:FgVQKmVdqdmZTbxIptqJC/l+xEzdiXsaAOs/vGAvWzs= +github.com/DataDog/agent-payload/v5 v5.0.133 h1:3tl5zi6NEstCXApCyJCT5LDX5uVKloAch8/W+kVmPnY= +github.com/DataDog/agent-payload/v5 v5.0.133/go.mod h1:FgVQKmVdqdmZTbxIptqJC/l+xEzdiXsaAOs/vGAvWzs= github.com/DataDog/datadog-agent/cmd/agent/common/path v0.57.1 h1:9WpqKeK4bAc8pSb0sK4fY03bUOqhWUZdGoVh55KBaNI= github.com/DataDog/datadog-agent/cmd/agent/common/path v0.57.1/go.mod h1:NhSO8oDfl4gs8SFyRSWoKxajDjkNmhZV9MEqdr4LQ7g= github.com/DataDog/datadog-agent/comp/api/api/def v0.57.1 h1:fQGQhFD4ELB1L/NrIgHuC1wfhJHLAOZSPidzor034BE= @@ -990,8 +990,8 @@ github.com/apache/arrow/go/v16 v16.1.0 h1:dwgfOya6s03CzH9JrjCBx6bkVb4yPD4ma3haj9 github.com/apache/arrow/go/v16 v16.1.0/go.mod h1:9wnc9mn6vEDTRIm4+27pEjQpRKuTvBaessPoEXQzxWA= github.com/apache/arrow/go/v17 v17.0.0 h1:RRR2bdqKcdbss9Gxy2NS/hK8i4LDMh23L6BbkN5+F54= github.com/apache/arrow/go/v17 v17.0.0/go.mod h1:jR7QHkODl15PfYyjM2nU+yTLScZ/qfj7OSUZmJ8putc= -github.com/apache/pulsar-client-go v0.13.1 h1:XAAKXjF99du7LP6qu/nBII1HC2nS483/vQoQIWmm5Yg= -github.com/apache/pulsar-client-go v0.13.1/go.mod h1:0X5UCs+Cv5w6Ds38EZebUMfyVUFIh+URF2BeipEVhIU= +github.com/apache/pulsar-client-go v0.14.0 h1:P7yfAQhQ52OCAu8yVmtdbNQ81vV8bF54S2MLmCPJC9w= +github.com/apache/pulsar-client-go v0.14.0/go.mod h1:PNUE29x9G1EHMvm41Bs2vcqwgv7N8AEjeej+nEVYbX8= github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/apache/thrift v0.21.0 h1:tdPmh/ptjE1IJnhbhrcl2++TauVjy242rkV/UzJChnE= github.com/apache/thrift v0.21.0/go.mod h1:W1H8aR/QRtYNvrPeFXBtobyRkd0/YVhTc6i07XIAgDw= @@ -1015,61 +1015,61 @@ github.com/aws/aws-sdk-go v1.44.263/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8 github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= -github.com/aws/aws-sdk-go-v2 v1.30.5 h1:mWSRTwQAb0aLE17dSzztCVJWI9+cRMgqebndjwDyK0g= -github.com/aws/aws-sdk-go-v2 v1.30.5/go.mod h1:CT+ZPWXbYrci8chcARI3OmI/qgd+f6WtuLOoaIA8PR0= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.4 h1:70PVAiL15/aBMh5LThwgXdSQorVr91L127ttckI9QQU= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.4/go.mod h1:/MQxMqci8tlqDH+pjmoLu1i0tbWCUP1hhyMRuFxpQCw= +github.com/aws/aws-sdk-go-v2 v1.31.0 h1:3V05LbxTSItI5kUqNwhJrrrY1BAXxXt0sN0l72QmG5U= +github.com/aws/aws-sdk-go-v2 v1.31.0/go.mod h1:ztolYtaEUtdpf9Wftr31CJfLVjOnD/CVRkKOOYgF8hA= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.5 h1:xDAuZTn4IMm8o1LnBZvmrL8JA1io4o3YWNXgohbf20g= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.5/go.mod h1:wYSv6iDS621sEFLfKvpPE2ugjTuGlAG7iROg0hLOkfc= github.com/aws/aws-sdk-go-v2/config v1.18.25/go.mod h1:dZnYpD5wTW/dQF0rRNLVypB396zWCcPiBIvdvSWHEg4= -github.com/aws/aws-sdk-go-v2/config v1.27.35 h1:jeFgiWYNV0vrgdZqB4kZBjYNdy0IKkwrAjr2fwpHIig= -github.com/aws/aws-sdk-go-v2/config v1.27.35/go.mod h1:qnpEvTq8ZfjrCqmJGRfWZuF+lGZ/vG8LK2K0L/TY1gQ= +github.com/aws/aws-sdk-go-v2/config v1.27.39 h1:FCylu78eTGzW1ynHcongXK9YHtoXD5AiiUqq3YfJYjU= +github.com/aws/aws-sdk-go-v2/config v1.27.39/go.mod h1:wczj2hbyskP4LjMKBEZwPRO1shXY+GsQleab+ZXT2ik= github.com/aws/aws-sdk-go-v2/credentials v1.13.24/go.mod h1:jYPYi99wUOPIFi0rhiOvXeSEReVOzBqFNOX5bXYoG2o= -github.com/aws/aws-sdk-go-v2/credentials v1.17.33 h1:lBHAQQznENv0gLHAZ73ONiTSkCtr8q3pSqWrpbBBZz0= -github.com/aws/aws-sdk-go-v2/credentials v1.17.33/go.mod h1:MBuqCUOT3ChfLuxNDGyra67eskx7ge9e3YKYBce7wpI= +github.com/aws/aws-sdk-go-v2/credentials v1.17.37 h1:G2aOH01yW8X373JK419THj5QVqu9vKEwxSEsGxihoW0= +github.com/aws/aws-sdk-go-v2/credentials v1.17.37/go.mod h1:0ecCjlb7htYCptRD45lXJ6aJDQac6D2NlKGpZqyTG6A= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13 h1:pfQ2sqNpMVK6xz2RbqLEL0GH87JOwSxPV2rzm8Zsb74= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13/go.mod h1:NG7RXPUlqfsCLLFfi0+IpKN4sCB9D9fw/qTaSB+xRoU= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 h1:C/d03NAmh8C4BZXhuRNboF/DqhBkBCeDiJDcaqIT5pA= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14/go.mod h1:7I0Ju7p9mCIdlrfS+JCgqcYD0VXz/N4yozsox+0o078= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15 h1:7Zwtt/lP3KNRkeZre7soMELMGNoBrutx8nobg1jKWmo= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.16.15/go.mod h1:436h2adoHb57yd+8W+gYPrrA9U/R/SuAuOO42Ushzhw= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17 h1:pI7Bzt0BJtYA0N/JEC6B8fJ4RBrEMi1LBrkMdFYNSnQ= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17/go.mod h1:Dh5zzJYMtxfIjYW+/evjQ8uj2OyR/ve2KROHGHlSFqE= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 h1:kYQ3H1u0ANr9KEKlGs/jTLrBFPo8P8NaH/w7A01NeeM= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18/go.mod h1:r506HmK5JDUh9+Mw4CfGJGSSoqIiLCndAuqXuhbv67Y= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27/go.mod h1:UrHnn3QV/d0pBZ6QBAEQcqFLf8FAzLmoUfPVIueOvoM= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17 h1:Mqr/V5gvrhA2gvgnF42Zh5iMiQNcOYthFYwCyrnuWlc= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17/go.mod h1:aLJpZlCmjE+V+KtN1q1uyZkfnUWpQGpbsn89XPKyzfU= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 h1:Z7IdFUONvTcvS7YuhtVxN99v2cCoHRXOS4mTr0B/pUc= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18/go.mod h1:DkKMmksZVVyat+Y+r1dEOgJEfUeA7UngIHWeKsi0yNc= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34/go.mod h1:Etz2dj6UHYuw+Xw830KfzCfWGMzqvUTCjUj5b76GVDc= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.17 h1:Roo69qTpfu8OlJ2Tb7pAYVuF0CpuUMB0IYWwYP/4DZM= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.17/go.mod h1:NcWPxQzGM1USQggaTVwz6VpqMZPX1CvDJLDh6jnOCa4= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4 h1:KypMCbLPPHEmf9DgMGw51jMj77VfGPAN2Kv4cfhlfgI= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4/go.mod h1:Vz1JQXliGcQktFTN/LN6uGppAIRoLBR2bMvIMP0gOjc= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.19 h1:FLMkfEiRjhgeDTCjjLoc3URo/TBkgeQbocA78lfkzSI= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.19/go.mod h1:Vx+GucNSsdhaxs3aZIKfSUjKVGsxN25nX2SRcdhuw08= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.18 h1:OWYvKL53l1rbsUmW7bQyJVsYU/Ii3bbAAQIIFNbM0Tk= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.18/go.mod h1:CUx0G1v3wG6l01tUB+j7Y8kclA8NSqK4ef0YG79a4cg= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 h1:QFASJGfT8wMXtuP3D5CRmMjARHv9ZmzFUMJznHDOY3w= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5/go.mod h1:QdZ3OmoIjSX+8D1OPAzPxDfjXASbBMDsz9qvtyIhtik= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.20 h1:rTWjG6AvWekO2B1LHeM3ktU7MqyX9rzWQ7hgzneZW7E= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.20/go.mod h1:RGW2DDpVc8hu6Y6yG8G5CHVmVOAn1oV8rNKOHRJyswg= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27/go.mod h1:EOwBD4J4S5qYszS5/3DpkejfuK+Z5/1uzICfPaZLtqw= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19 h1:rfprUlsdzgl7ZL2KlXiUAoJnI/VxfHCvDFr2QDFj6u4= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19/go.mod h1:SCWkEdRq8/7EK60NcvvQ6NXKuTcchAD4ROAsC37VEZE= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.17 h1:u+EfGmksnJc/x5tq3A+OD7LrMbSSR/5TrKLvkdy/fhY= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.17/go.mod h1:VaMx6302JHax2vHJWgRo+5n9zvbacs3bLU/23DNQrTY= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.29.8 h1:l+OOHQ/s1pV1eWDbxrJKKzdXf1SbMRFpUOqvDVMiV78= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.29.8/go.mod h1:URGOU9fStCYx2LYLwT0g8XpsIa5CAk8mq+MbrxCgJDc= -github.com/aws/aws-sdk-go-v2/service/s3 v1.61.3 h1:O/rjUvLED2dWzrSY6wv3njBjJlH4LT2xYRnUm402ovI= -github.com/aws/aws-sdk-go-v2/service/s3 v1.61.3/go.mod h1:5FmD/Dqq57gP+XwaUnd5WFPipAuzrf0HmupX27Gvjvc= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.9 h1:croIrE67fpV6wff+0M8jbrJZpKSlrqVGrCnqNU5rtoI= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.9/go.mod h1:BYr9P/rrcLNJ8A36nT15p8tpoVDZ5lroHuMn/njecBw= -github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.31.8 h1:lR2PZfD1YNEPq0TSljh1Zfxmr53FaKZOTf90hQKmH/4= -github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.31.8/go.mod h1:JsD+G3R0ZMWqjt7VDggNsc5SFl4hw+Sk8KQaRN1sltI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 h1:Xbwbmk44URTiHNx6PNo0ujDE6ERlsCKJD3u1zfnzAPg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20/go.mod h1:oAfOFzUB14ltPZj1rWwRc3d/6OgD76R8KlvU3EqM9Fg= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.18 h1:eb+tFOIl9ZsUe2259/BKPeniKuz4/02zZFH/i4Nf8Rg= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.18/go.mod h1:GVCC2IJNJTmdlyEsSmofEy7EfJncP7DNnXDzRjJ5Keg= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.31.2 h1:BCUoERI55kdfbqgxRnor5oOI8h3EEy/AlETa/UmHQZ0= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.31.2/go.mod h1:/D7NWV/jWRxPDDsSySncYt8JT4QHYeqgiR7r2vP2hYw= +github.com/aws/aws-sdk-go-v2/service/s3 v1.63.3 h1:3zt8qqznMuAZWDTDpcwv9Xr11M/lVj2FsRR7oYBt0OA= +github.com/aws/aws-sdk-go-v2/service/s3 v1.63.3/go.mod h1:NLTqRLe3pUNu3nTEHI6XlHLKYmc8fbHUdMxAB6+s41Q= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.33.3 h1:W2M3kQSuN1+FXgV2wMv1JMWPxw/37wBN87QHYDuTV0Y= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.33.3/go.mod h1:WyLS5qwXHtjKAONYZq/4ewdd+hcVsa3LBu77Ow5uj3k= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.32.3 h1:55Y/RewMJExiMaz4SUl9ZfjgM4Fi/caaN6wVJ+i3lto= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.32.3/go.mod h1:hbMVfSdZneCht4UmPOsejDt93QnetQPFuLOOqbuybqs= github.com/aws/aws-sdk-go-v2/service/sso v1.12.10/go.mod h1:ouy2P4z6sJN70fR3ka3wD3Ro3KezSxU6eKGQI2+2fjI= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.8 h1:JRwuL+S1Qe1owZQoxblV7ORgRf2o0SrtzDVIbaVCdQ0= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.8/go.mod h1:eEygMHnTKH/3kNp9Jr1n3PdejuSNcgwLe1dWgQtO0VQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.23.3 h1:rs4JCczF805+FDv2tRhZ1NU0RB2H6ryAvsWPanAr72Y= +github.com/aws/aws-sdk-go-v2/service/sso v1.23.3/go.mod h1:XRlMvmad0ZNL+75C5FYdMvbbLkd6qiqz6foR1nA1PXY= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10/go.mod h1:AFvkxc8xfBe8XA+5St5XIHHrQQtkxqrRincx4hmMHOk= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.8 h1:+HpGETD9463PFSj7lX5+eq7aLDs85QUIA+NBkeAsscA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.8/go.mod h1:bCbAxKDqNvkHxRaIMnyVPXPo+OaPRwvmgzMxbz1VKSA= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3 h1:S7EPdMVZod8BGKQQPTBK+FcX9g7bKR7c4+HxWqHP7Vg= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3/go.mod h1:FnvDM4sfa+isJ3kDXIzAB9GAwVSzFzSy97uZ3IsHo4E= github.com/aws/aws-sdk-go-v2/service/sts v1.19.0/go.mod h1:BgQOMsg8av8jset59jelyPW7NoZcZXLVpDsXunGDrk8= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.8 h1:bAi+4p5EKnni+jrfcAhb7iHFQ24bthOAV9t0taf3DCE= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.8/go.mod h1:NXi1dIAGteSaRLqYgarlhP/Ij0cFT+qmCwiJqWh/U5o= +github.com/aws/aws-sdk-go-v2/service/sts v1.31.3 h1:VzudTFrDCIDakXtemR7l6Qzt2+JYsVqo2MxBPt5k8T8= +github.com/aws/aws-sdk-go-v2/service/sts v1.31.3/go.mod h1:yMWe0F+XG0DkRZK5ODZhG7BEFYhLXi2dqGsv6tX0cgI= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= -github.com/aws/smithy-go v1.20.4 h1:2HK1zBdPgRbjFOHlfeQZfpC4r72MOb9bZkiFwggKO+4= -github.com/aws/smithy-go v1.20.4/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +github.com/aws/smithy-go v1.21.0 h1:H7L8dtDRk0P1Qm6y0ji7MCYMQObJ5R9CRpyPhRUkLYA= +github.com/aws/smithy-go v1.21.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/axiomhq/hyperloglog v0.0.0-20230201085229-3ddf4bad03dc h1:Keo7wQ7UODUaHcEi7ltENhbAK2VgZjfat6mLy03tQzo= github.com/axiomhq/hyperloglog v0.0.0-20230201085229-3ddf4bad03dc/go.mod h1:k08r+Yj1PRAmuayFiRK6MYuR5Ve4IuZtTfxErMIh0+c= github.com/bahlo/generic-list-go v0.2.0 h1:5sz/EEAK+ls5wF+NeqDpk5+iNdMDXrh3z3nPnH1Wvgk= @@ -1151,8 +1151,8 @@ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20240723142845-024c85f92f20 h1:N+3sFI5GUjRKBi+i0TxYVST9h4Ie192jJWpHvthBBgg= -github.com/cncf/xds/go v0.0.0-20240723142845-024c85f92f20/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= +github.com/cncf/xds/go v0.0.0-20240822171458-6449f94b4d59 h1:fLZ97KE86ELjEYJCEUVzmbhfzDxHHGwBrDVMd4XL6Bs= +github.com/cncf/xds/go v0.0.0-20240822171458-6449f94b4d59/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= github.com/containerd/cgroups/v3 v3.0.3 h1:S5ByHZ/h9PMe5IOQoN7E+nMc2UcLEM/V48DGDJ9kip0= github.com/containerd/cgroups/v3 v3.0.3/go.mod h1:8HBe7V3aWGLFPd/k03swSIsGjZhHI2WzJmticMgVuz0= github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= @@ -1232,6 +1232,8 @@ github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 h1:Oy0F4A github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3/go.mod h1:YvSRo5mw33fLEx1+DlK6L2VV43tJt5Eyel9n9XBcR+0= github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= +github.com/ebitengine/purego v0.8.0 h1:JbqvnEzRvPpxhCJzJJ2y0RbiZ8nyjccVUrSM3q+GvvE= +github.com/ebitengine/purego v0.8.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/elastic/elastic-transport-go/v8 v8.6.0 h1:Y2S/FBjx1LlCv5m6pWAF2kDJAHoSjSRSJCApolgfthA= github.com/elastic/elastic-transport-go/v8 v8.6.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk= github.com/elastic/go-docappender/v2 v2.3.0 h1:Vr+l36jM+sE/LHp0JFxSIbHlWTSk8CpBblYWZZ/I1KA= @@ -1393,8 +1395,8 @@ github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJA github.com/goccy/go-json v0.9.11/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M= -github.com/gocql/gocql v1.6.0 h1:IdFdOTbnpbd0pDhl4REKQDM+Q0SzKXQ1Yh+YZZ8T/qU= -github.com/gocql/gocql v1.6.0/go.mod h1:3gM2c4D3AnkISwBxGnMMsS8Oy4y2lhbPRsH4xnJrHG8= +github.com/gocql/gocql v1.7.0 h1:O+7U7/1gSN7QTEAaMEsJc1Oq2QHXvCWoF3DFK9HDHus= +github.com/gocql/gocql v1.7.0/go.mod h1:vnlvXyFZeLBF0Wy+RS8hrOdbn0UWsWtdg07XJnFxZ+4= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= @@ -1965,8 +1967,8 @@ github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/open-telemetry/opamp-go v0.15.0 h1:X2TWhEsGQ8GP7Uos3Ic9v/1aFUqoECZXKS7xAF5HqsA= github.com/open-telemetry/opamp-go v0.15.0/go.mod h1:QyPeN56JXlcZt5yG5RMdZ50Ju+zMFs1Ihy/hwHyF8Oo= -github.com/open-telemetry/otel-arrow v0.26.0 h1:zizyFFtYfVzkjXGtY5iFSR5ognddzwJlD8fGPsVgCLo= -github.com/open-telemetry/otel-arrow v0.26.0/go.mod h1:QGueLcxK3nVjRnVCevyyeCEnI2YkFqgT/TWgw58eVy4= +github.com/open-telemetry/otel-arrow v0.27.0 h1:dxEaCM1epON+iauCNvju/uxeChLwz5u4ifAY3BdjWFU= +github.com/open-telemetry/otel-arrow v0.27.0/go.mod h1:QGueLcxK3nVjRnVCevyyeCEnI2YkFqgT/TWgw58eVy4= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= @@ -2011,8 +2013,8 @@ github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCko github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 h1:jYi87L8j62qkXzaYHAQAhEapgukhenIMZRBKTNRLHJ4= -github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= +github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c h1:dAMKvw0MlJT1GshSTtih8C2gDs04w8dReiOGXrGLNoY= +github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY= github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= @@ -2071,8 +2073,8 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= -github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= +github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= +github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -2132,8 +2134,8 @@ github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NF github.com/shirou/gopsutil/v3 v3.22.12/go.mod h1:Xd7P1kwZcp5VW52+9XsirIKd/BROzbb2wdX3Kqlz9uI= github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI= github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk= -github.com/shirou/gopsutil/v4 v4.24.8 h1:pVQjIenQkIhqO81mwTaXjTzOMT7d3TZkf43PlVFHENI= -github.com/shirou/gopsutil/v4 v4.24.8/go.mod h1:wE0OrJtj4dG+hYkxqDH3QiBICdKSf04/npcvLLc/oRg= +github.com/shirou/gopsutil/v4 v4.24.9 h1:KIV+/HaHD5ka5f570RZq+2SaeFsb/pq+fp2DGNWYoOI= +github.com/shirou/gopsutil/v4 v4.24.9/go.mod h1:3fkaHNeYsUFCGZ8+9vZVWtbyM1k2eRnlL+bWO8Bxa/Q= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v1.7.1 h1:UJcjSAI3aUKx52kfcfhblgyhZceouhvvs3OYdWgn+PY= @@ -2218,8 +2220,8 @@ github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSW github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 h1:kdXcSzyDtseVEc4yCz2qF8ZrQvIDBJLl4S1c3GCXmoI= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tedsuo/ifrit v0.0.0-20180802180643-bea94bb476cc/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1009 h1:nlftpuG6a8AOnvzYikn1i4vsZLgL20RMXphyVVS5GTQ= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1009/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1015 h1:O60uxxfWztVPVUBQjlJaop2Dw/J7CXGK9fSErMdWw+Y= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1015/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= 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/tg123/go-htpasswd v1.2.2 h1:tmNccDsQ+wYsoRfiONzIhDm5OkVHQzN3w4FOBAlN6BY= @@ -2236,8 +2238,8 @@ github.com/tidwall/tinylru v1.1.0 h1:XY6IUfzVTU9rpwdhKUF6nQdChgCdGjkMfLzbWyiau6I github.com/tidwall/tinylru v1.1.0/go.mod h1:3+bX+TJ2baOLMWTnlyNWHh4QMnFyARg2TLTQ6OFbzw8= github.com/tidwall/wal v1.1.7 h1:emc1TRjIVsdKKSnpwGBAcsAGg0767SvUk8+ygx7Bb+4= github.com/tidwall/wal v1.1.7/go.mod h1:r6lR1j27W9EPalgHiB7zLJDYu3mzW5BQP5KrzBpYY/E= -github.com/tinylib/msgp v1.2.1 h1:6ypy2qcCznxpP4hpORzhtXyTqrBs7cfM9MCCWY8zsmU= -github.com/tinylib/msgp v1.2.1/go.mod h1:2vIGs3lcUo8izAATNobrCHevYZC/LMsJtw4JPiYPHro= +github.com/tinylib/msgp v1.2.2 h1:iHiBE1tJQwFI740SPEPkGE8cfhNfrqOYRlH450BnC/4= +github.com/tinylib/msgp v1.2.2/go.mod h1:ykjzy2wzgrlvpDCRc4LA8UXy6D8bzMSuAF3WD57Gok0= github.com/tj/assert v0.0.3 h1:Df/BlaZ20mq6kuai7f5z2TvPFiwC3xaWJSDQNiIS3Rk= github.com/tj/assert v0.0.3/go.mod h1:Ne6X72Q+TB1AteidzQncjw9PabbMp4PBMZ1k+vd1Pvk= github.com/tjfoc/gmsm v1.3.2 h1:7JVkAn5bvUJ7HtU08iW6UiD+UTmJTIToHCfeFzkcCxM= @@ -2333,8 +2335,8 @@ go.etcd.io/bbolt v1.3.11/go.mod h1:dksAq7YMXoljX0xu6VF5DMZGbhYYoLUalEiSySYAS4I= go.mongodb.org/atlas v0.37.0 h1:zQnO1o5+bVP9IotpAYpres4UjMD2F4nwNEFTZhNL4ck= go.mongodb.org/atlas v0.37.0/go.mod h1:DJYtM+vsEpPEMSkQzJnFHrT0sP7ev6cseZc/GGjJYG8= go.mongodb.org/mongo-driver v1.11.4/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= -go.mongodb.org/mongo-driver v1.17.0 h1:Hp4q2MCjvY19ViwimTs00wHi7G4yzxh4/2+nTx8r40k= -go.mongodb.org/mongo-driver v1.17.0/go.mod h1:wwWm/+BuOddhcq3n68LKRmgk2wXzmF6s0SFOa0GINL4= +go.mongodb.org/mongo-driver v1.17.1 h1:Wic5cJIwJgSpBhe3lx3+/RybR5PiYRMpVFgO7cOHyIM= +go.mongodb.org/mongo-driver v1.17.1/go.mod h1:wwWm/+BuOddhcq3n68LKRmgk2wXzmF6s0SFOa0GINL4= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -2462,6 +2464,8 @@ go.opentelemetry.io/collector/service v0.110.0 h1:jeGdUi+5HQuH0Ho/Gd+VusY77MYJAU go.opentelemetry.io/collector/service v0.110.0/go.mod h1:FDa4DFK49FhjNvLnin48bdxZ15IedaU86EcyD3BceqU= go.opentelemetry.io/contrib/config v0.10.0 h1:2JknAzMaYjxrHkTnZh3eOme/Y2P5eHE2SWfhfV6Xd6c= go.opentelemetry.io/contrib/config v0.10.0/go.mod h1:aND2M6/KfNkntI5cyvHriR/zvZgPf8j9yETdSmvpfmc= +go.opentelemetry.io/contrib/detectors/gcp v1.29.0 h1:TiaiXB4DpGD3sdzNlYQxruQngn5Apwzi1X0DRhuGvDQ= +go.opentelemetry.io/contrib/detectors/gcp v1.29.0/go.mod h1:GW2aWZNwR2ZxDLdv8OyC2G8zkRoQBuURgV7RPQgcPoU= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.55.0 h1:hCq2hNMwsegUvPzI7sPOvtO9cqyy5GbWt/Ybp2xrx8Q= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.55.0/go.mod h1:LqaApwGx/oUmzsbqxkzuBvyoPpkxk3JQWnqfVrJ3wCA= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.55.0 h1:ZIg3ZT/aQ7AfKqdwp7ECpOK6vHqquXXuyTjIO8ZdmPs= @@ -3001,8 +3005,8 @@ golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 h1:LLhsEBxRTBLuKlQxFBYUOU8xyFgXv6cOTp2HASDlsDk= -golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= +golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= @@ -3070,8 +3074,8 @@ google.golang.org/api v0.108.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/ google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI= google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0= google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= -google.golang.org/api v0.198.0 h1:OOH5fZatk57iN0A7tjJQzt6aPfYQ1JiWkt1yGseazks= -google.golang.org/api v0.198.0/go.mod h1:/Lblzl3/Xqqk9hw/yS97TImKTUwnf1bv89v7+OagJzc= +google.golang.org/api v0.199.0 h1:aWUXClp+VFJmqE0JPvpZOK3LDQMyFKYIow4etYd9qxs= +google.golang.org/api v0.199.0/go.mod h1:ohG4qSztDJmZdjK/Ar6MhbAmb/Rpi4JHOqagsh90K28= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -3263,8 +3267,8 @@ google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5v google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= diff --git a/cmd/oteltestbedcol/builder-config.yaml b/cmd/oteltestbedcol/builder-config.yaml index dd2664f36d86..b03182becee1 100644 --- a/cmd/oteltestbedcol/builder-config.yaml +++ b/cmd/oteltestbedcol/builder-config.yaml @@ -109,5 +109,4 @@ replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest => ../../pkg/pdatatest - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil => ../../pkg/pdatautil - github.com/openshift/api v3.9.0+incompatible => github.com/openshift/api v0.0.0-20180801171038-322a19404e37 - - github.com/outcaste-io/ristretto v0.2.0 => github.com/outcaste-io/ristretto v0.2.1 - github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension => ../../extension/ackextension diff --git a/cmd/oteltestbedcol/go.mod b/cmd/oteltestbedcol/go.mod index 31387ec0b421..ff8a3ceedd36 100644 --- a/cmd/oteltestbedcol/go.mod +++ b/cmd/oteltestbedcol/go.mod @@ -89,6 +89,7 @@ require ( github.com/docker/docker v27.1.1+incompatible // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect + github.com/ebitengine/purego v0.8.0 // indirect github.com/elastic/go-grok v0.3.1 // indirect github.com/elastic/go-structform v0.0.12 // indirect github.com/elastic/lunes v0.1.0 // indirect @@ -203,7 +204,7 @@ require ( github.com/opensearch-project/opensearch-go/v2 v2.3.0 // indirect github.com/openzipkin/zipkin-go v0.4.3 // indirect github.com/ovh/go-ovh v1.6.0 // indirect - github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 // indirect + github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect @@ -211,21 +212,20 @@ require ( github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect github.com/prometheus/client_golang v1.20.4 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.59.1 // indirect + github.com/prometheus/common v0.60.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/prometheus/prometheus v0.54.1 // indirect github.com/rs/cors v1.11.1 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.29 // indirect - github.com/shirou/gopsutil/v4 v4.24.8 // indirect - github.com/shoenig/go-m1cpu v0.1.6 // indirect + github.com/shirou/gopsutil/v4 v4.24.9 // indirect github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 // indirect github.com/signalfx/sapm-proto v0.14.0 // indirect github.com/soheilhy/cmux v0.1.5 // indirect github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/testify v1.9.0 // indirect - github.com/tinylib/msgp v1.2.1 // indirect + github.com/tinylib/msgp v1.2.2 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 // indirect @@ -297,7 +297,7 @@ require ( golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/mod v0.19.0 // indirect golang.org/x/net v0.29.0 // indirect - golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sync v0.8.0 // indirect golang.org/x/term v0.24.0 // indirect golang.org/x/text v0.18.0 // indirect @@ -307,7 +307,7 @@ require ( google.golang.org/api v0.188.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/grpc v1.67.0 // indirect + google.golang.org/grpc v1.67.1 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect @@ -422,6 +422,4 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil replace github.com/openshift/api v3.9.0+incompatible => github.com/openshift/api v0.0.0-20180801171038-322a19404e37 -replace github.com/outcaste-io/ristretto v0.2.0 => github.com/outcaste-io/ristretto v0.2.1 - replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/ackextension => ../../extension/ackextension diff --git a/cmd/oteltestbedcol/go.sum b/cmd/oteltestbedcol/go.sum index 0344b3004529..cb7bcf21c40c 100644 --- a/cmd/oteltestbedcol/go.sum +++ b/cmd/oteltestbedcol/go.sum @@ -160,6 +160,8 @@ github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/ebitengine/purego v0.8.0 h1:JbqvnEzRvPpxhCJzJJ2y0RbiZ8nyjccVUrSM3q+GvvE= +github.com/ebitengine/purego v0.8.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/elastic/go-grok v0.3.1 h1:WEhUxe2KrwycMnlvMimJXvzRa7DoByJB4PVUIE1ZD/U= github.com/elastic/go-grok v0.3.1/go.mod h1:n38ls8ZgOboZRgKcjMY8eFeZFMmcL9n2lP0iHhIDk64= github.com/elastic/go-structform v0.0.12 h1:HXpzlAKyej8T7LobqKDThUw7BMhwV6Db24VwxNtgxCs= @@ -544,8 +546,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= -github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 h1:jYi87L8j62qkXzaYHAQAhEapgukhenIMZRBKTNRLHJ4= -github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= +github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c h1:dAMKvw0MlJT1GshSTtih8C2gDs04w8dReiOGXrGLNoY= +github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -579,8 +581,8 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= -github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= +github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= +github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -609,8 +611,8 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUt github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI= github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk= -github.com/shirou/gopsutil/v4 v4.24.8 h1:pVQjIenQkIhqO81mwTaXjTzOMT7d3TZkf43PlVFHENI= -github.com/shirou/gopsutil/v4 v4.24.8/go.mod h1:wE0OrJtj4dG+hYkxqDH3QiBICdKSf04/npcvLLc/oRg= +github.com/shirou/gopsutil/v4 v4.24.9 h1:KIV+/HaHD5ka5f570RZq+2SaeFsb/pq+fp2DGNWYoOI= +github.com/shirou/gopsutil/v4 v4.24.9/go.mod h1:3fkaHNeYsUFCGZ8+9vZVWtbyM1k2eRnlL+bWO8Bxa/Q= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v1.7.1 h1:UJcjSAI3aUKx52kfcfhblgyhZceouhvvs3OYdWgn+PY= @@ -670,8 +672,8 @@ github.com/tidwall/tinylru v1.1.0 h1:XY6IUfzVTU9rpwdhKUF6nQdChgCdGjkMfLzbWyiau6I github.com/tidwall/tinylru v1.1.0/go.mod h1:3+bX+TJ2baOLMWTnlyNWHh4QMnFyARg2TLTQ6OFbzw8= github.com/tidwall/wal v1.1.7 h1:emc1TRjIVsdKKSnpwGBAcsAGg0767SvUk8+ygx7Bb+4= github.com/tidwall/wal v1.1.7/go.mod h1:r6lR1j27W9EPalgHiB7zLJDYu3mzW5BQP5KrzBpYY/E= -github.com/tinylib/msgp v1.2.1 h1:6ypy2qcCznxpP4hpORzhtXyTqrBs7cfM9MCCWY8zsmU= -github.com/tinylib/msgp v1.2.1/go.mod h1:2vIGs3lcUo8izAATNobrCHevYZC/LMsJtw4JPiYPHro= +github.com/tinylib/msgp v1.2.2 h1:iHiBE1tJQwFI740SPEPkGE8cfhNfrqOYRlH450BnC/4= +github.com/tinylib/msgp v1.2.2/go.mod h1:ykjzy2wzgrlvpDCRc4LA8UXy6D8bzMSuAF3WD57Gok0= 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= @@ -959,8 +961,8 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1190,8 +1192,8 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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 v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/cmd/telemetrygen/go.mod b/cmd/telemetrygen/go.mod index cbdda6d6fa58..d8f92c6218f4 100644 --- a/cmd/telemetrygen/go.mod +++ b/cmd/telemetrygen/go.mod @@ -26,7 +26,7 @@ require ( go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 golang.org/x/time v0.6.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 ) require ( diff --git a/cmd/telemetrygen/go.sum b/cmd/telemetrygen/go.sum index 8b8486d45dc6..2e9a8cf820bb 100644 --- a/cmd/telemetrygen/go.sum +++ b/cmd/telemetrygen/go.sum @@ -202,8 +202,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/cmd/telemetrygen/internal/e2etest/go.mod b/cmd/telemetrygen/internal/e2etest/go.mod index fc6d68446be1..ce21fc3bcd09 100644 --- a/cmd/telemetrygen/internal/e2etest/go.mod +++ b/cmd/telemetrygen/internal/e2etest/go.mod @@ -83,7 +83,7 @@ require ( golang.org/x/time v0.6.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/grpc v1.67.0 // indirect + google.golang.org/grpc v1.67.1 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/cmd/telemetrygen/internal/e2etest/go.sum b/cmd/telemetrygen/internal/e2etest/go.sum index 2ebfb89a2d28..2296ccddb8af 100644 --- a/cmd/telemetrygen/internal/e2etest/go.sum +++ b/cmd/telemetrygen/internal/e2etest/go.sum @@ -260,8 +260,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/confmap/provider/s3provider/go.mod b/confmap/provider/s3provider/go.mod index de4fcfd60c73..c1331460532c 100644 --- a/confmap/provider/s3provider/go.mod +++ b/confmap/provider/s3provider/go.mod @@ -3,9 +3,9 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provide go 1.22.0 require ( - github.com/aws/aws-sdk-go-v2 v1.30.5 - github.com/aws/aws-sdk-go-v2/config v1.27.35 - github.com/aws/aws-sdk-go-v2/service/s3 v1.61.3 + github.com/aws/aws-sdk-go-v2 v1.31.0 + github.com/aws/aws-sdk-go-v2/config v1.27.39 + github.com/aws/aws-sdk-go-v2/service/s3 v1.63.3 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/confmap v1.16.0 go.uber.org/goleak v1.3.0 @@ -13,21 +13,21 @@ require ( ) require ( - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.4 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.33 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.5 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.37 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.17 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.19 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.17 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.22.8 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.8 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.30.8 // indirect - github.com/aws/smithy-go v1.20.4 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.18 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.20 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.18 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.23.3 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.31.3 // indirect + github.com/aws/smithy-go v1.21.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-viper/mapstructure/v2 v2.1.0 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect diff --git a/confmap/provider/s3provider/go.sum b/confmap/provider/s3provider/go.sum index 97d4f0100a56..daec6a0e736a 100644 --- a/confmap/provider/s3provider/go.sum +++ b/confmap/provider/s3provider/go.sum @@ -1,39 +1,39 @@ -github.com/aws/aws-sdk-go-v2 v1.30.5 h1:mWSRTwQAb0aLE17dSzztCVJWI9+cRMgqebndjwDyK0g= -github.com/aws/aws-sdk-go-v2 v1.30.5/go.mod h1:CT+ZPWXbYrci8chcARI3OmI/qgd+f6WtuLOoaIA8PR0= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.4 h1:70PVAiL15/aBMh5LThwgXdSQorVr91L127ttckI9QQU= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.4/go.mod h1:/MQxMqci8tlqDH+pjmoLu1i0tbWCUP1hhyMRuFxpQCw= -github.com/aws/aws-sdk-go-v2/config v1.27.35 h1:jeFgiWYNV0vrgdZqB4kZBjYNdy0IKkwrAjr2fwpHIig= -github.com/aws/aws-sdk-go-v2/config v1.27.35/go.mod h1:qnpEvTq8ZfjrCqmJGRfWZuF+lGZ/vG8LK2K0L/TY1gQ= -github.com/aws/aws-sdk-go-v2/credentials v1.17.33 h1:lBHAQQznENv0gLHAZ73ONiTSkCtr8q3pSqWrpbBBZz0= -github.com/aws/aws-sdk-go-v2/credentials v1.17.33/go.mod h1:MBuqCUOT3ChfLuxNDGyra67eskx7ge9e3YKYBce7wpI= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13 h1:pfQ2sqNpMVK6xz2RbqLEL0GH87JOwSxPV2rzm8Zsb74= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13/go.mod h1:NG7RXPUlqfsCLLFfi0+IpKN4sCB9D9fw/qTaSB+xRoU= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17 h1:pI7Bzt0BJtYA0N/JEC6B8fJ4RBrEMi1LBrkMdFYNSnQ= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17/go.mod h1:Dh5zzJYMtxfIjYW+/evjQ8uj2OyR/ve2KROHGHlSFqE= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17 h1:Mqr/V5gvrhA2gvgnF42Zh5iMiQNcOYthFYwCyrnuWlc= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17/go.mod h1:aLJpZlCmjE+V+KtN1q1uyZkfnUWpQGpbsn89XPKyzfU= +github.com/aws/aws-sdk-go-v2 v1.31.0 h1:3V05LbxTSItI5kUqNwhJrrrY1BAXxXt0sN0l72QmG5U= +github.com/aws/aws-sdk-go-v2 v1.31.0/go.mod h1:ztolYtaEUtdpf9Wftr31CJfLVjOnD/CVRkKOOYgF8hA= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.5 h1:xDAuZTn4IMm8o1LnBZvmrL8JA1io4o3YWNXgohbf20g= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.5/go.mod h1:wYSv6iDS621sEFLfKvpPE2ugjTuGlAG7iROg0hLOkfc= +github.com/aws/aws-sdk-go-v2/config v1.27.39 h1:FCylu78eTGzW1ynHcongXK9YHtoXD5AiiUqq3YfJYjU= +github.com/aws/aws-sdk-go-v2/config v1.27.39/go.mod h1:wczj2hbyskP4LjMKBEZwPRO1shXY+GsQleab+ZXT2ik= +github.com/aws/aws-sdk-go-v2/credentials v1.17.37 h1:G2aOH01yW8X373JK419THj5QVqu9vKEwxSEsGxihoW0= +github.com/aws/aws-sdk-go-v2/credentials v1.17.37/go.mod h1:0ecCjlb7htYCptRD45lXJ6aJDQac6D2NlKGpZqyTG6A= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 h1:C/d03NAmh8C4BZXhuRNboF/DqhBkBCeDiJDcaqIT5pA= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14/go.mod h1:7I0Ju7p9mCIdlrfS+JCgqcYD0VXz/N4yozsox+0o078= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 h1:kYQ3H1u0ANr9KEKlGs/jTLrBFPo8P8NaH/w7A01NeeM= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18/go.mod h1:r506HmK5JDUh9+Mw4CfGJGSSoqIiLCndAuqXuhbv67Y= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 h1:Z7IdFUONvTcvS7YuhtVxN99v2cCoHRXOS4mTr0B/pUc= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18/go.mod h1:DkKMmksZVVyat+Y+r1dEOgJEfUeA7UngIHWeKsi0yNc= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.17 h1:Roo69qTpfu8OlJ2Tb7pAYVuF0CpuUMB0IYWwYP/4DZM= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.17/go.mod h1:NcWPxQzGM1USQggaTVwz6VpqMZPX1CvDJLDh6jnOCa4= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4 h1:KypMCbLPPHEmf9DgMGw51jMj77VfGPAN2Kv4cfhlfgI= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4/go.mod h1:Vz1JQXliGcQktFTN/LN6uGppAIRoLBR2bMvIMP0gOjc= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.19 h1:FLMkfEiRjhgeDTCjjLoc3URo/TBkgeQbocA78lfkzSI= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.19/go.mod h1:Vx+GucNSsdhaxs3aZIKfSUjKVGsxN25nX2SRcdhuw08= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19 h1:rfprUlsdzgl7ZL2KlXiUAoJnI/VxfHCvDFr2QDFj6u4= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19/go.mod h1:SCWkEdRq8/7EK60NcvvQ6NXKuTcchAD4ROAsC37VEZE= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.17 h1:u+EfGmksnJc/x5tq3A+OD7LrMbSSR/5TrKLvkdy/fhY= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.17/go.mod h1:VaMx6302JHax2vHJWgRo+5n9zvbacs3bLU/23DNQrTY= -github.com/aws/aws-sdk-go-v2/service/s3 v1.61.3 h1:O/rjUvLED2dWzrSY6wv3njBjJlH4LT2xYRnUm402ovI= -github.com/aws/aws-sdk-go-v2/service/s3 v1.61.3/go.mod h1:5FmD/Dqq57gP+XwaUnd5WFPipAuzrf0HmupX27Gvjvc= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.8 h1:JRwuL+S1Qe1owZQoxblV7ORgRf2o0SrtzDVIbaVCdQ0= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.8/go.mod h1:eEygMHnTKH/3kNp9Jr1n3PdejuSNcgwLe1dWgQtO0VQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.8 h1:+HpGETD9463PFSj7lX5+eq7aLDs85QUIA+NBkeAsscA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.8/go.mod h1:bCbAxKDqNvkHxRaIMnyVPXPo+OaPRwvmgzMxbz1VKSA= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.8 h1:bAi+4p5EKnni+jrfcAhb7iHFQ24bthOAV9t0taf3DCE= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.8/go.mod h1:NXi1dIAGteSaRLqYgarlhP/Ij0cFT+qmCwiJqWh/U5o= -github.com/aws/smithy-go v1.20.4 h1:2HK1zBdPgRbjFOHlfeQZfpC4r72MOb9bZkiFwggKO+4= -github.com/aws/smithy-go v1.20.4/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.18 h1:OWYvKL53l1rbsUmW7bQyJVsYU/Ii3bbAAQIIFNbM0Tk= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.18/go.mod h1:CUx0G1v3wG6l01tUB+j7Y8kclA8NSqK4ef0YG79a4cg= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 h1:QFASJGfT8wMXtuP3D5CRmMjARHv9ZmzFUMJznHDOY3w= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5/go.mod h1:QdZ3OmoIjSX+8D1OPAzPxDfjXASbBMDsz9qvtyIhtik= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.20 h1:rTWjG6AvWekO2B1LHeM3ktU7MqyX9rzWQ7hgzneZW7E= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.20/go.mod h1:RGW2DDpVc8hu6Y6yG8G5CHVmVOAn1oV8rNKOHRJyswg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 h1:Xbwbmk44URTiHNx6PNo0ujDE6ERlsCKJD3u1zfnzAPg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20/go.mod h1:oAfOFzUB14ltPZj1rWwRc3d/6OgD76R8KlvU3EqM9Fg= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.18 h1:eb+tFOIl9ZsUe2259/BKPeniKuz4/02zZFH/i4Nf8Rg= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.18/go.mod h1:GVCC2IJNJTmdlyEsSmofEy7EfJncP7DNnXDzRjJ5Keg= +github.com/aws/aws-sdk-go-v2/service/s3 v1.63.3 h1:3zt8qqznMuAZWDTDpcwv9Xr11M/lVj2FsRR7oYBt0OA= +github.com/aws/aws-sdk-go-v2/service/s3 v1.63.3/go.mod h1:NLTqRLe3pUNu3nTEHI6XlHLKYmc8fbHUdMxAB6+s41Q= +github.com/aws/aws-sdk-go-v2/service/sso v1.23.3 h1:rs4JCczF805+FDv2tRhZ1NU0RB2H6ryAvsWPanAr72Y= +github.com/aws/aws-sdk-go-v2/service/sso v1.23.3/go.mod h1:XRlMvmad0ZNL+75C5FYdMvbbLkd6qiqz6foR1nA1PXY= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3 h1:S7EPdMVZod8BGKQQPTBK+FcX9g7bKR7c4+HxWqHP7Vg= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3/go.mod h1:FnvDM4sfa+isJ3kDXIzAB9GAwVSzFzSy97uZ3IsHo4E= +github.com/aws/aws-sdk-go-v2/service/sts v1.31.3 h1:VzudTFrDCIDakXtemR7l6Qzt2+JYsVqo2MxBPt5k8T8= +github.com/aws/aws-sdk-go-v2/service/sts v1.31.3/go.mod h1:yMWe0F+XG0DkRZK5ODZhG7BEFYhLXi2dqGsv6tX0cgI= +github.com/aws/smithy-go v1.21.0 h1:H7L8dtDRk0P1Qm6y0ji7MCYMQObJ5R9CRpyPhRUkLYA= +github.com/aws/smithy-go v1.21.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= 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-viper/mapstructure/v2 v2.1.0 h1:gHnMa2Y/pIxElCH2GlZZ1lZSsn6XMtufpGyP1XxdC/w= diff --git a/confmap/provider/secretsmanagerprovider/go.mod b/confmap/provider/secretsmanagerprovider/go.mod index 03f50c75b3a7..fddb28141976 100644 --- a/confmap/provider/secretsmanagerprovider/go.mod +++ b/confmap/provider/secretsmanagerprovider/go.mod @@ -3,25 +3,25 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provide go 1.22.0 require ( - github.com/aws/aws-sdk-go-v2/config v1.27.35 - github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.9 + github.com/aws/aws-sdk-go-v2/config v1.27.39 + github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.33.3 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/confmap v1.16.0 ) require ( - github.com/aws/aws-sdk-go-v2 v1.30.5 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.33 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17 // indirect + github.com/aws/aws-sdk-go-v2 v1.31.0 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.37 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.22.8 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.8 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.30.8 // indirect - github.com/aws/smithy-go v1.20.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.23.3 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.31.3 // indirect + github.com/aws/smithy-go v1.21.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/go-viper/mapstructure/v2 v2.1.0 // indirect github.com/knadh/koanf v1.5.0 // indirect diff --git a/confmap/provider/secretsmanagerprovider/go.sum b/confmap/provider/secretsmanagerprovider/go.sum index ca62ed0af448..1d1413106aee 100644 --- a/confmap/provider/secretsmanagerprovider/go.sum +++ b/confmap/provider/secretsmanagerprovider/go.sum @@ -12,43 +12,43 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aws/aws-sdk-go-v2 v1.9.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= -github.com/aws/aws-sdk-go-v2 v1.30.5 h1:mWSRTwQAb0aLE17dSzztCVJWI9+cRMgqebndjwDyK0g= -github.com/aws/aws-sdk-go-v2 v1.30.5/go.mod h1:CT+ZPWXbYrci8chcARI3OmI/qgd+f6WtuLOoaIA8PR0= +github.com/aws/aws-sdk-go-v2 v1.31.0 h1:3V05LbxTSItI5kUqNwhJrrrY1BAXxXt0sN0l72QmG5U= +github.com/aws/aws-sdk-go-v2 v1.31.0/go.mod h1:ztolYtaEUtdpf9Wftr31CJfLVjOnD/CVRkKOOYgF8hA= github.com/aws/aws-sdk-go-v2/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= -github.com/aws/aws-sdk-go-v2/config v1.27.35 h1:jeFgiWYNV0vrgdZqB4kZBjYNdy0IKkwrAjr2fwpHIig= -github.com/aws/aws-sdk-go-v2/config v1.27.35/go.mod h1:qnpEvTq8ZfjrCqmJGRfWZuF+lGZ/vG8LK2K0L/TY1gQ= +github.com/aws/aws-sdk-go-v2/config v1.27.39 h1:FCylu78eTGzW1ynHcongXK9YHtoXD5AiiUqq3YfJYjU= +github.com/aws/aws-sdk-go-v2/config v1.27.39/go.mod h1:wczj2hbyskP4LjMKBEZwPRO1shXY+GsQleab+ZXT2ik= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= -github.com/aws/aws-sdk-go-v2/credentials v1.17.33 h1:lBHAQQznENv0gLHAZ73ONiTSkCtr8q3pSqWrpbBBZz0= -github.com/aws/aws-sdk-go-v2/credentials v1.17.33/go.mod h1:MBuqCUOT3ChfLuxNDGyra67eskx7ge9e3YKYBce7wpI= +github.com/aws/aws-sdk-go-v2/credentials v1.17.37 h1:G2aOH01yW8X373JK419THj5QVqu9vKEwxSEsGxihoW0= +github.com/aws/aws-sdk-go-v2/credentials v1.17.37/go.mod h1:0ecCjlb7htYCptRD45lXJ6aJDQac6D2NlKGpZqyTG6A= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.6.0/go.mod h1:gqlclDEZp4aqJOancXK6TN24aKhT0W0Ae9MHk3wzTMM= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13 h1:pfQ2sqNpMVK6xz2RbqLEL0GH87JOwSxPV2rzm8Zsb74= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13/go.mod h1:NG7RXPUlqfsCLLFfi0+IpKN4sCB9D9fw/qTaSB+xRoU= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17 h1:pI7Bzt0BJtYA0N/JEC6B8fJ4RBrEMi1LBrkMdFYNSnQ= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17/go.mod h1:Dh5zzJYMtxfIjYW+/evjQ8uj2OyR/ve2KROHGHlSFqE= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17 h1:Mqr/V5gvrhA2gvgnF42Zh5iMiQNcOYthFYwCyrnuWlc= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17/go.mod h1:aLJpZlCmjE+V+KtN1q1uyZkfnUWpQGpbsn89XPKyzfU= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 h1:C/d03NAmh8C4BZXhuRNboF/DqhBkBCeDiJDcaqIT5pA= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14/go.mod h1:7I0Ju7p9mCIdlrfS+JCgqcYD0VXz/N4yozsox+0o078= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 h1:kYQ3H1u0ANr9KEKlGs/jTLrBFPo8P8NaH/w7A01NeeM= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18/go.mod h1:r506HmK5JDUh9+Mw4CfGJGSSoqIiLCndAuqXuhbv67Y= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 h1:Z7IdFUONvTcvS7YuhtVxN99v2cCoHRXOS4mTr0B/pUc= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18/go.mod h1:DkKMmksZVVyat+Y+r1dEOgJEfUeA7UngIHWeKsi0yNc= github.com/aws/aws-sdk-go-v2/internal/ini v1.2.4/go.mod h1:ZcBrrI3zBKlhGFNYWvju0I3TR93I7YIgAfy82Fh4lcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= github.com/aws/aws-sdk-go-v2/service/appconfig v1.4.2/go.mod h1:FZ3HkCe+b10uFZZkFdvf98LHW21k49W8o8J366lqVKY= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4 h1:KypMCbLPPHEmf9DgMGw51jMj77VfGPAN2Kv4cfhlfgI= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4/go.mod h1:Vz1JQXliGcQktFTN/LN6uGppAIRoLBR2bMvIMP0gOjc= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 h1:QFASJGfT8wMXtuP3D5CRmMjARHv9ZmzFUMJznHDOY3w= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5/go.mod h1:QdZ3OmoIjSX+8D1OPAzPxDfjXASbBMDsz9qvtyIhtik= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.2/go.mod h1:72HRZDLMtmVQiLG2tLfQcaWLCssELvGl+Zf2WVxMmR8= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19 h1:rfprUlsdzgl7ZL2KlXiUAoJnI/VxfHCvDFr2QDFj6u4= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19/go.mod h1:SCWkEdRq8/7EK60NcvvQ6NXKuTcchAD4ROAsC37VEZE= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.9 h1:croIrE67fpV6wff+0M8jbrJZpKSlrqVGrCnqNU5rtoI= -github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.32.9/go.mod h1:BYr9P/rrcLNJ8A36nT15p8tpoVDZ5lroHuMn/njecBw= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 h1:Xbwbmk44URTiHNx6PNo0ujDE6ERlsCKJD3u1zfnzAPg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20/go.mod h1:oAfOFzUB14ltPZj1rWwRc3d/6OgD76R8KlvU3EqM9Fg= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.33.3 h1:W2M3kQSuN1+FXgV2wMv1JMWPxw/37wBN87QHYDuTV0Y= +github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.33.3/go.mod h1:WyLS5qwXHtjKAONYZq/4ewdd+hcVsa3LBu77Ow5uj3k= github.com/aws/aws-sdk-go-v2/service/sso v1.4.2/go.mod h1:NBvT9R1MEF+Ud6ApJKM0G+IkPchKS7p7c2YPKwHmBOk= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.8 h1:JRwuL+S1Qe1owZQoxblV7ORgRf2o0SrtzDVIbaVCdQ0= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.8/go.mod h1:eEygMHnTKH/3kNp9Jr1n3PdejuSNcgwLe1dWgQtO0VQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.8 h1:+HpGETD9463PFSj7lX5+eq7aLDs85QUIA+NBkeAsscA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.8/go.mod h1:bCbAxKDqNvkHxRaIMnyVPXPo+OaPRwvmgzMxbz1VKSA= +github.com/aws/aws-sdk-go-v2/service/sso v1.23.3 h1:rs4JCczF805+FDv2tRhZ1NU0RB2H6ryAvsWPanAr72Y= +github.com/aws/aws-sdk-go-v2/service/sso v1.23.3/go.mod h1:XRlMvmad0ZNL+75C5FYdMvbbLkd6qiqz6foR1nA1PXY= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3 h1:S7EPdMVZod8BGKQQPTBK+FcX9g7bKR7c4+HxWqHP7Vg= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3/go.mod h1:FnvDM4sfa+isJ3kDXIzAB9GAwVSzFzSy97uZ3IsHo4E= github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.8 h1:bAi+4p5EKnni+jrfcAhb7iHFQ24bthOAV9t0taf3DCE= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.8/go.mod h1:NXi1dIAGteSaRLqYgarlhP/Ij0cFT+qmCwiJqWh/U5o= +github.com/aws/aws-sdk-go-v2/service/sts v1.31.3 h1:VzudTFrDCIDakXtemR7l6Qzt2+JYsVqo2MxBPt5k8T8= +github.com/aws/aws-sdk-go-v2/service/sts v1.31.3/go.mod h1:yMWe0F+XG0DkRZK5ODZhG7BEFYhLXi2dqGsv6tX0cgI= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= -github.com/aws/smithy-go v1.20.4 h1:2HK1zBdPgRbjFOHlfeQZfpC4r72MOb9bZkiFwggKO+4= -github.com/aws/smithy-go v1.20.4/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +github.com/aws/smithy-go v1.21.0 h1:H7L8dtDRk0P1Qm6y0ji7MCYMQObJ5R9CRpyPhRUkLYA= +github.com/aws/smithy-go v1.21.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= diff --git a/connector/countconnector/config_test.go b/connector/countconnector/config_test.go index 02f9a1a1104c..d3f37776f846 100644 --- a/connector/countconnector/config_test.go +++ b/connector/countconnector/config_test.go @@ -515,8 +515,7 @@ func TestConfigErrors(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { err := tc.input.Validate() - assert.Error(t, err) - assert.Contains(t, err.Error(), tc.expect) + assert.ErrorContains(t, err, tc.expect) }) } } diff --git a/connector/datadogconnector/go.mod b/connector/datadogconnector/go.mod index ee111a44d444..6fe2b6b74a4a 100644 --- a/connector/datadogconnector/go.mod +++ b/connector/datadogconnector/go.mod @@ -40,7 +40,7 @@ require ( require ( cloud.google.com/go/compute/metadata v0.5.2 // indirect - github.com/DataDog/agent-payload/v5 v5.0.132 // indirect + github.com/DataDog/agent-payload/v5 v5.0.133 // indirect github.com/DataDog/datadog-agent/comp/core/config v0.57.1 // indirect github.com/DataDog/datadog-agent/comp/core/flare/builder v0.57.1 // indirect github.com/DataDog/datadog-agent/comp/core/flare/types v0.57.1 // indirect @@ -123,6 +123,7 @@ require ( github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect + github.com/ebitengine/purego v0.8.0 // indirect github.com/elastic/go-grok v0.3.1 // indirect github.com/elastic/lunes v0.1.0 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect @@ -201,12 +202,12 @@ require ( github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect github.com/prometheus/client_golang v1.20.4 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.59.1 // indirect + github.com/prometheus/common v0.60.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/rs/cors v1.11.1 // indirect github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect github.com/shirou/gopsutil/v3 v3.24.5 // indirect - github.com/shirou/gopsutil/v4 v4.24.8 // indirect + github.com/shirou/gopsutil/v4 v4.24.9 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/spf13/afero v1.10.0 // indirect github.com/spf13/cast v1.5.1 // indirect @@ -280,7 +281,7 @@ require ( go.uber.org/multierr v1.11.0 // indirect golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa // indirect golang.org/x/net v0.29.0 // indirect - golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sys v0.25.0 // indirect golang.org/x/term v0.24.0 // indirect golang.org/x/text v0.18.0 // indirect diff --git a/connector/datadogconnector/go.sum b/connector/datadogconnector/go.sum index b0e03d011311..84c119da889c 100644 --- a/connector/datadogconnector/go.sum +++ b/connector/datadogconnector/go.sum @@ -66,8 +66,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Code-Hex/go-generics-cache v1.5.1 h1:6vhZGc5M7Y/YD8cIUcY8kcuQLB4cHR7U+0KMqAA0KcU= github.com/Code-Hex/go-generics-cache v1.5.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= -github.com/DataDog/agent-payload/v5 v5.0.132 h1:F9wy+iyAgN2QmkEsOlPp3RrQ4vOb4T6k3BXhjSpELS4= -github.com/DataDog/agent-payload/v5 v5.0.132/go.mod h1:FgVQKmVdqdmZTbxIptqJC/l+xEzdiXsaAOs/vGAvWzs= +github.com/DataDog/agent-payload/v5 v5.0.133 h1:3tl5zi6NEstCXApCyJCT5LDX5uVKloAch8/W+kVmPnY= +github.com/DataDog/agent-payload/v5 v5.0.133/go.mod h1:FgVQKmVdqdmZTbxIptqJC/l+xEzdiXsaAOs/vGAvWzs= github.com/DataDog/datadog-agent/cmd/agent/common/path v0.57.1 h1:9WpqKeK4bAc8pSb0sK4fY03bUOqhWUZdGoVh55KBaNI= github.com/DataDog/datadog-agent/cmd/agent/common/path v0.57.1/go.mod h1:NhSO8oDfl4gs8SFyRSWoKxajDjkNmhZV9MEqdr4LQ7g= github.com/DataDog/datadog-agent/comp/api/api/def v0.57.1 h1:fQGQhFD4ELB1L/NrIgHuC1wfhJHLAOZSPidzor034BE= @@ -332,6 +332,8 @@ github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3 github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/ebitengine/purego v0.8.0 h1:JbqvnEzRvPpxhCJzJJ2y0RbiZ8nyjccVUrSM3q+GvvE= +github.com/ebitengine/purego v0.8.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/elastic/go-grok v0.3.1 h1:WEhUxe2KrwycMnlvMimJXvzRa7DoByJB4PVUIE1ZD/U= github.com/elastic/go-grok v0.3.1/go.mod h1:n38ls8ZgOboZRgKcjMY8eFeZFMmcL9n2lP0iHhIDk64= github.com/elastic/lunes v0.1.0 h1:amRtLPjwkWtzDF/RKzcEPMvSsSseLDLW+bnhfNSLRe4= @@ -763,8 +765,8 @@ github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7q github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= -github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= +github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= +github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -791,8 +793,8 @@ github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xe github.com/shirou/gopsutil/v3 v3.22.12/go.mod h1:Xd7P1kwZcp5VW52+9XsirIKd/BROzbb2wdX3Kqlz9uI= github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI= github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk= -github.com/shirou/gopsutil/v4 v4.24.8 h1:pVQjIenQkIhqO81mwTaXjTzOMT7d3TZkf43PlVFHENI= -github.com/shirou/gopsutil/v4 v4.24.8/go.mod h1:wE0OrJtj4dG+hYkxqDH3QiBICdKSf04/npcvLLc/oRg= +github.com/shirou/gopsutil/v4 v4.24.9 h1:KIV+/HaHD5ka5f570RZq+2SaeFsb/pq+fp2DGNWYoOI= +github.com/shirou/gopsutil/v4 v4.24.9/go.mod h1:3fkaHNeYsUFCGZ8+9vZVWtbyM1k2eRnlL+bWO8Bxa/Q= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= @@ -1167,8 +1169,8 @@ golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/connector/exceptionsconnector/go.mod b/connector/exceptionsconnector/go.mod index 112901046e42..b88ac3b8577c 100644 --- a/connector/exceptionsconnector/go.mod +++ b/connector/exceptionsconnector/go.mod @@ -18,7 +18,7 @@ require ( go.opentelemetry.io/collector/semconv v0.110.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 ) require ( diff --git a/connector/exceptionsconnector/go.sum b/connector/exceptionsconnector/go.sum index d5ecfff7d988..c7f54c86836f 100644 --- a/connector/exceptionsconnector/go.sum +++ b/connector/exceptionsconnector/go.sum @@ -131,8 +131,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/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.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/connector/spanmetricsconnector/go.mod b/connector/spanmetricsconnector/go.mod index ed36a016fe89..a382a7205d13 100644 --- a/connector/spanmetricsconnector/go.mod +++ b/connector/spanmetricsconnector/go.mod @@ -22,7 +22,7 @@ require ( go.opentelemetry.io/collector/semconv v0.110.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 ) require ( diff --git a/connector/spanmetricsconnector/go.sum b/connector/spanmetricsconnector/go.sum index e58687113750..31bc1e5b268d 100644 --- a/connector/spanmetricsconnector/go.sum +++ b/connector/spanmetricsconnector/go.sum @@ -143,8 +143,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/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.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/connector/sumconnector/config_test.go b/connector/sumconnector/config_test.go index 17cc98ed5926..79462d8f3099 100644 --- a/connector/sumconnector/config_test.go +++ b/connector/sumconnector/config_test.go @@ -574,8 +574,7 @@ func TestConfigErrors(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { err := tc.input.Validate() - assert.Error(t, err) - assert.Contains(t, err.Error(), tc.expect) + assert.ErrorContains(t, err, tc.expect) }) } } diff --git a/exporter/alertmanagerexporter/config_test.go b/exporter/alertmanagerexporter/config_test.go index d00bf9a966b6..e884e0c17755 100644 --- a/exporter/alertmanagerexporter/config_test.go +++ b/exporter/alertmanagerexporter/config_test.go @@ -4,6 +4,7 @@ package alertmanagerexporter import ( + "net/http" "path/filepath" "testing" "time" @@ -23,6 +24,7 @@ import ( ) func TestLoadConfig(t *testing.T) { + defaultTransport := http.DefaultTransport.(*http.Transport) t.Parallel() cm, err := confmaptest.LoadConf(filepath.Join("testdata", "config.yaml")) @@ -74,9 +76,13 @@ func TestLoadConfig(t *testing.T) { CAFile: "/var/lib/mycert.pem", }, }, - ReadBufferSize: 0, - WriteBufferSize: 524288, - Timeout: time.Second * 10, + ReadBufferSize: 0, + WriteBufferSize: 524288, + Timeout: time.Second * 10, + MaxIdleConns: &defaultTransport.MaxIdleConns, + MaxIdleConnsPerHost: &defaultTransport.MaxIdleConnsPerHost, + MaxConnsPerHost: &defaultTransport.MaxConnsPerHost, + IdleConnTimeout: &defaultTransport.IdleConnTimeout, }, }, }, diff --git a/exporter/alertmanagerexporter/factory.go b/exporter/alertmanagerexporter/factory.go index 67d604a8d0a5..4a0675e477b2 100644 --- a/exporter/alertmanagerexporter/factory.go +++ b/exporter/alertmanagerexporter/factory.go @@ -10,7 +10,6 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" - "go.opentelemetry.io/collector/config/configopaque" "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exporterhelper" @@ -27,18 +26,18 @@ func NewFactory() exporter.Factory { } func createDefaultConfig() component.Config { + clientConfig := confighttp.NewDefaultClientConfig() + clientConfig.Endpoint = "http://localhost:9093" + clientConfig.Timeout = 30 * time.Second + clientConfig.WriteBufferSize = 512 * 1024 + return &Config{ GeneratorURL: "opentelemetry-collector", DefaultSeverity: "info", TimeoutSettings: exporterhelper.NewDefaultTimeoutConfig(), BackoffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueConfig(), - ClientConfig: confighttp.ClientConfig{ - Endpoint: "http://localhost:9093", - Timeout: 30 * time.Second, - Headers: map[string]configopaque.String{}, - WriteBufferSize: 512 * 1024, - }, + ClientConfig: clientConfig, } } diff --git a/exporter/alertmanagerexporter/go.mod b/exporter/alertmanagerexporter/go.mod index 9c79ce089c47..b07e10519505 100644 --- a/exporter/alertmanagerexporter/go.mod +++ b/exporter/alertmanagerexporter/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/cenkalti/backoff/v4 v4.3.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.110.0 - github.com/prometheus/common v0.59.1 + github.com/prometheus/common v0.60.0 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.110.0 go.opentelemetry.io/collector/config/confighttp v0.110.0 diff --git a/exporter/alertmanagerexporter/go.sum b/exporter/alertmanagerexporter/go.sum index 3ce24324fbf5..924b178a30bb 100644 --- a/exporter/alertmanagerexporter/go.sum +++ b/exporter/alertmanagerexporter/go.sum @@ -54,8 +54,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/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= -github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= +github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= +github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= 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= diff --git a/exporter/awskinesisexporter/go.mod b/exporter/awskinesisexporter/go.mod index c7d9db693252..af4335ba0703 100644 --- a/exporter/awskinesisexporter/go.mod +++ b/exporter/awskinesisexporter/go.mod @@ -3,11 +3,11 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskin go 1.22.0 require ( - github.com/aws/aws-sdk-go-v2 v1.30.5 - github.com/aws/aws-sdk-go-v2/config v1.27.35 - github.com/aws/aws-sdk-go-v2/credentials v1.17.33 - github.com/aws/aws-sdk-go-v2/service/kinesis v1.29.8 - github.com/aws/aws-sdk-go-v2/service/sts v1.30.8 + github.com/aws/aws-sdk-go-v2 v1.31.0 + github.com/aws/aws-sdk-go-v2/config v1.27.39 + github.com/aws/aws-sdk-go-v2/credentials v1.17.37 + github.com/aws/aws-sdk-go-v2/service/kinesis v1.31.2 + github.com/aws/aws-sdk-go-v2/service/sts v1.31.3 github.com/cenkalti/backoff/v4 v4.3.0 github.com/gogo/protobuf v1.3.2 github.com/google/uuid v1.6.0 @@ -28,16 +28,16 @@ require ( require ( github.com/apache/thrift v0.20.0 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.4 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.5 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.22.8 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.8 // indirect - github.com/aws/smithy-go v1.20.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.23.3 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3 // indirect + github.com/aws/smithy-go v1.21.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect diff --git a/exporter/awskinesisexporter/go.sum b/exporter/awskinesisexporter/go.sum index 68fcdf84bc32..b5343705bceb 100644 --- a/exporter/awskinesisexporter/go.sum +++ b/exporter/awskinesisexporter/go.sum @@ -1,35 +1,35 @@ github.com/apache/thrift v0.20.0 h1:631+KvYbsBZxmuJjYwhezVsrfc/TbqtZV4QcxOX1fOI= github.com/apache/thrift v0.20.0/go.mod h1:hOk1BQqcp2OLzGsyVXdfMk7YFlMxK3aoEVhjD06QhB8= -github.com/aws/aws-sdk-go-v2 v1.30.5 h1:mWSRTwQAb0aLE17dSzztCVJWI9+cRMgqebndjwDyK0g= -github.com/aws/aws-sdk-go-v2 v1.30.5/go.mod h1:CT+ZPWXbYrci8chcARI3OmI/qgd+f6WtuLOoaIA8PR0= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.4 h1:70PVAiL15/aBMh5LThwgXdSQorVr91L127ttckI9QQU= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.4/go.mod h1:/MQxMqci8tlqDH+pjmoLu1i0tbWCUP1hhyMRuFxpQCw= -github.com/aws/aws-sdk-go-v2/config v1.27.35 h1:jeFgiWYNV0vrgdZqB4kZBjYNdy0IKkwrAjr2fwpHIig= -github.com/aws/aws-sdk-go-v2/config v1.27.35/go.mod h1:qnpEvTq8ZfjrCqmJGRfWZuF+lGZ/vG8LK2K0L/TY1gQ= -github.com/aws/aws-sdk-go-v2/credentials v1.17.33 h1:lBHAQQznENv0gLHAZ73ONiTSkCtr8q3pSqWrpbBBZz0= -github.com/aws/aws-sdk-go-v2/credentials v1.17.33/go.mod h1:MBuqCUOT3ChfLuxNDGyra67eskx7ge9e3YKYBce7wpI= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13 h1:pfQ2sqNpMVK6xz2RbqLEL0GH87JOwSxPV2rzm8Zsb74= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13/go.mod h1:NG7RXPUlqfsCLLFfi0+IpKN4sCB9D9fw/qTaSB+xRoU= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17 h1:pI7Bzt0BJtYA0N/JEC6B8fJ4RBrEMi1LBrkMdFYNSnQ= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17/go.mod h1:Dh5zzJYMtxfIjYW+/evjQ8uj2OyR/ve2KROHGHlSFqE= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17 h1:Mqr/V5gvrhA2gvgnF42Zh5iMiQNcOYthFYwCyrnuWlc= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17/go.mod h1:aLJpZlCmjE+V+KtN1q1uyZkfnUWpQGpbsn89XPKyzfU= +github.com/aws/aws-sdk-go-v2 v1.31.0 h1:3V05LbxTSItI5kUqNwhJrrrY1BAXxXt0sN0l72QmG5U= +github.com/aws/aws-sdk-go-v2 v1.31.0/go.mod h1:ztolYtaEUtdpf9Wftr31CJfLVjOnD/CVRkKOOYgF8hA= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.5 h1:xDAuZTn4IMm8o1LnBZvmrL8JA1io4o3YWNXgohbf20g= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.5/go.mod h1:wYSv6iDS621sEFLfKvpPE2ugjTuGlAG7iROg0hLOkfc= +github.com/aws/aws-sdk-go-v2/config v1.27.39 h1:FCylu78eTGzW1ynHcongXK9YHtoXD5AiiUqq3YfJYjU= +github.com/aws/aws-sdk-go-v2/config v1.27.39/go.mod h1:wczj2hbyskP4LjMKBEZwPRO1shXY+GsQleab+ZXT2ik= +github.com/aws/aws-sdk-go-v2/credentials v1.17.37 h1:G2aOH01yW8X373JK419THj5QVqu9vKEwxSEsGxihoW0= +github.com/aws/aws-sdk-go-v2/credentials v1.17.37/go.mod h1:0ecCjlb7htYCptRD45lXJ6aJDQac6D2NlKGpZqyTG6A= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 h1:C/d03NAmh8C4BZXhuRNboF/DqhBkBCeDiJDcaqIT5pA= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14/go.mod h1:7I0Ju7p9mCIdlrfS+JCgqcYD0VXz/N4yozsox+0o078= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 h1:kYQ3H1u0ANr9KEKlGs/jTLrBFPo8P8NaH/w7A01NeeM= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18/go.mod h1:r506HmK5JDUh9+Mw4CfGJGSSoqIiLCndAuqXuhbv67Y= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 h1:Z7IdFUONvTcvS7YuhtVxN99v2cCoHRXOS4mTr0B/pUc= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18/go.mod h1:DkKMmksZVVyat+Y+r1dEOgJEfUeA7UngIHWeKsi0yNc= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4 h1:KypMCbLPPHEmf9DgMGw51jMj77VfGPAN2Kv4cfhlfgI= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4/go.mod h1:Vz1JQXliGcQktFTN/LN6uGppAIRoLBR2bMvIMP0gOjc= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19 h1:rfprUlsdzgl7ZL2KlXiUAoJnI/VxfHCvDFr2QDFj6u4= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19/go.mod h1:SCWkEdRq8/7EK60NcvvQ6NXKuTcchAD4ROAsC37VEZE= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.29.8 h1:l+OOHQ/s1pV1eWDbxrJKKzdXf1SbMRFpUOqvDVMiV78= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.29.8/go.mod h1:URGOU9fStCYx2LYLwT0g8XpsIa5CAk8mq+MbrxCgJDc= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.8 h1:JRwuL+S1Qe1owZQoxblV7ORgRf2o0SrtzDVIbaVCdQ0= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.8/go.mod h1:eEygMHnTKH/3kNp9Jr1n3PdejuSNcgwLe1dWgQtO0VQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.8 h1:+HpGETD9463PFSj7lX5+eq7aLDs85QUIA+NBkeAsscA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.8/go.mod h1:bCbAxKDqNvkHxRaIMnyVPXPo+OaPRwvmgzMxbz1VKSA= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.8 h1:bAi+4p5EKnni+jrfcAhb7iHFQ24bthOAV9t0taf3DCE= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.8/go.mod h1:NXi1dIAGteSaRLqYgarlhP/Ij0cFT+qmCwiJqWh/U5o= -github.com/aws/smithy-go v1.20.4 h1:2HK1zBdPgRbjFOHlfeQZfpC4r72MOb9bZkiFwggKO+4= -github.com/aws/smithy-go v1.20.4/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 h1:QFASJGfT8wMXtuP3D5CRmMjARHv9ZmzFUMJznHDOY3w= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5/go.mod h1:QdZ3OmoIjSX+8D1OPAzPxDfjXASbBMDsz9qvtyIhtik= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 h1:Xbwbmk44URTiHNx6PNo0ujDE6ERlsCKJD3u1zfnzAPg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20/go.mod h1:oAfOFzUB14ltPZj1rWwRc3d/6OgD76R8KlvU3EqM9Fg= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.31.2 h1:BCUoERI55kdfbqgxRnor5oOI8h3EEy/AlETa/UmHQZ0= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.31.2/go.mod h1:/D7NWV/jWRxPDDsSySncYt8JT4QHYeqgiR7r2vP2hYw= +github.com/aws/aws-sdk-go-v2/service/sso v1.23.3 h1:rs4JCczF805+FDv2tRhZ1NU0RB2H6ryAvsWPanAr72Y= +github.com/aws/aws-sdk-go-v2/service/sso v1.23.3/go.mod h1:XRlMvmad0ZNL+75C5FYdMvbbLkd6qiqz6foR1nA1PXY= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3 h1:S7EPdMVZod8BGKQQPTBK+FcX9g7bKR7c4+HxWqHP7Vg= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3/go.mod h1:FnvDM4sfa+isJ3kDXIzAB9GAwVSzFzSy97uZ3IsHo4E= +github.com/aws/aws-sdk-go-v2/service/sts v1.31.3 h1:VzudTFrDCIDakXtemR7l6Qzt2+JYsVqo2MxBPt5k8T8= +github.com/aws/aws-sdk-go-v2/service/sts v1.31.3/go.mod h1:yMWe0F+XG0DkRZK5ODZhG7BEFYhLXi2dqGsv6tX0cgI= +github.com/aws/smithy-go v1.21.0 h1:H7L8dtDRk0P1Qm6y0ji7MCYMQObJ5R9CRpyPhRUkLYA= +github.com/aws/smithy-go v1.21.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= 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= diff --git a/exporter/carbonexporter/exporter_test.go b/exporter/carbonexporter/exporter_test.go index b50703e0af82..f8920dcbc062 100644 --- a/exporter/carbonexporter/exporter_test.go +++ b/exporter/carbonexporter/exporter_test.go @@ -24,7 +24,7 @@ import ( "go.opentelemetry.io/collector/exporter/exportertest" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" - conventions "go.opentelemetry.io/collector/semconv/v1.9.0" + conventions "go.opentelemetry.io/collector/semconv/v1.27.0" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry" diff --git a/exporter/cassandraexporter/go.mod b/exporter/cassandraexporter/go.mod index f0d4d44c4e84..b45a7477ffca 100644 --- a/exporter/cassandraexporter/go.mod +++ b/exporter/cassandraexporter/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/cassan go 1.22.0 require ( - github.com/gocql/gocql v1.6.0 + github.com/gocql/gocql v1.7.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.110.0 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.110.0 diff --git a/exporter/cassandraexporter/go.sum b/exporter/cassandraexporter/go.sum index ce4054642d7c..ac9b6ffa1eea 100644 --- a/exporter/cassandraexporter/go.sum +++ b/exporter/cassandraexporter/go.sum @@ -14,8 +14,8 @@ 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.1.0 h1:gHnMa2Y/pIxElCH2GlZZ1lZSsn6XMtufpGyP1XxdC/w= github.com/go-viper/mapstructure/v2 v2.1.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= -github.com/gocql/gocql v1.6.0 h1:IdFdOTbnpbd0pDhl4REKQDM+Q0SzKXQ1Yh+YZZ8T/qU= -github.com/gocql/gocql v1.6.0/go.mod h1:3gM2c4D3AnkISwBxGnMMsS8Oy4y2lhbPRsH4xnJrHG8= +github.com/gocql/gocql v1.7.0 h1:O+7U7/1gSN7QTEAaMEsJc1Oq2QHXvCWoF3DFK9HDHus= +github.com/gocql/gocql v1.7.0/go.mod h1:vnlvXyFZeLBF0Wy+RS8hrOdbn0UWsWtdg07XJnFxZ+4= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= diff --git a/exporter/clickhouseexporter/exporter_logs_test.go b/exporter/clickhouseexporter/exporter_logs_test.go index a83b0952faff..7388e68f243c 100644 --- a/exporter/clickhouseexporter/exporter_logs_test.go +++ b/exporter/clickhouseexporter/exporter_logs_test.go @@ -40,8 +40,7 @@ func TestLogsExporter_New(t *testing.T) { failWithMsg := func(msg string) validate { return func(t *testing.T, _ *logsExporter, err error) { - require.Error(t, err) - require.Contains(t, err.Error(), msg) + require.ErrorContains(t, err, msg) } } diff --git a/exporter/coralogixexporter/go.mod b/exporter/coralogixexporter/go.mod index 9d068f37f12d..18ca79929d42 100644 --- a/exporter/coralogixexporter/go.mod +++ b/exporter/coralogixexporter/go.mod @@ -17,7 +17,7 @@ require ( go.opentelemetry.io/collector/pdata v1.16.0 go.uber.org/goleak v1.3.0 google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 ) require ( diff --git a/exporter/coralogixexporter/go.sum b/exporter/coralogixexporter/go.sum index 4cbbd690698c..dad7e5b1427f 100644 --- a/exporter/coralogixexporter/go.sum +++ b/exporter/coralogixexporter/go.sum @@ -169,8 +169,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/exporter/datadogexporter/factory.go b/exporter/datadogexporter/factory.go index ec13fbbd63d0..371666c298ad 100644 --- a/exporter/datadogexporter/factory.go +++ b/exporter/datadogexporter/factory.go @@ -190,10 +190,9 @@ func NewFactory() exporter.Factory { } func defaultClientConfig() confighttp.ClientConfig { - // do not use NewDefaultClientConfig for backwards-compatibility - return confighttp.ClientConfig{ - Timeout: 15 * time.Second, - } + client := confighttp.NewDefaultClientConfig() + client.Timeout = 15 * time.Second + return client } // createDefaultConfig creates the default exporter configuration diff --git a/exporter/datadogexporter/go.mod b/exporter/datadogexporter/go.mod index 844cbf98f5a4..6c579049bcd7 100644 --- a/exporter/datadogexporter/go.mod +++ b/exporter/datadogexporter/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datado go 1.22.0 require ( - github.com/DataDog/agent-payload/v5 v5.0.132 + github.com/DataDog/agent-payload/v5 v5.0.133 github.com/DataDog/datadog-agent/comp/core/config v0.57.1 github.com/DataDog/datadog-agent/comp/core/hostname/hostnameinterface v0.57.1 github.com/DataDog/datadog-agent/comp/core/log v0.56.2 @@ -167,6 +167,7 @@ require ( github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect + github.com/ebitengine/purego v0.8.0 // indirect github.com/elastic/go-grok v0.3.1 // indirect github.com/elastic/lunes v0.1.0 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect @@ -291,7 +292,7 @@ require ( github.com/prometheus-community/windows_exporter v0.27.2 // indirect github.com/prometheus/client_golang v1.20.4 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.59.1 // indirect + github.com/prometheus/common v0.60.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/prometheus/prometheus v0.54.1 // indirect @@ -299,7 +300,7 @@ require ( github.com/scaleway/scaleway-sdk-go v1.0.0-beta.29 // indirect github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect github.com/shirou/gopsutil/v3 v3.24.5 // indirect - github.com/shirou/gopsutil/v4 v4.24.8 // indirect + github.com/shirou/gopsutil/v4 v4.24.9 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/spf13/afero v1.10.0 // indirect github.com/spf13/cast v1.5.1 // indirect @@ -373,7 +374,7 @@ require ( golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa // indirect golang.org/x/mod v0.20.0 // indirect golang.org/x/net v0.29.0 // indirect - golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.25.0 // indirect golang.org/x/term v0.24.0 // indirect @@ -437,9 +438,6 @@ exclude github.com/DataDog/agent-payload/v5 v5.0.59 // openshift removed all tags from their repo, use the pseudoversion from the release-3.9 branch HEAD replace github.com/openshift/api v3.9.0+incompatible => github.com/openshift/api v0.0.0-20180801171038-322a19404e37 -// It appears that the v0.2.0 tag was modified. Replacing with v0.2.1 -replace github.com/outcaste-io/ristretto v0.2.0 => github.com/outcaste-io/ristretto v0.2.1 - replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest => ../../pkg/pdatatest replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest => ../../internal/k8stest diff --git a/exporter/datadogexporter/go.sum b/exporter/datadogexporter/go.sum index a64b7581d759..be0354adafff 100644 --- a/exporter/datadogexporter/go.sum +++ b/exporter/datadogexporter/go.sum @@ -73,8 +73,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Code-Hex/go-generics-cache v1.5.1 h1:6vhZGc5M7Y/YD8cIUcY8kcuQLB4cHR7U+0KMqAA0KcU= github.com/Code-Hex/go-generics-cache v1.5.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= -github.com/DataDog/agent-payload/v5 v5.0.132 h1:F9wy+iyAgN2QmkEsOlPp3RrQ4vOb4T6k3BXhjSpELS4= -github.com/DataDog/agent-payload/v5 v5.0.132/go.mod h1:FgVQKmVdqdmZTbxIptqJC/l+xEzdiXsaAOs/vGAvWzs= +github.com/DataDog/agent-payload/v5 v5.0.133 h1:3tl5zi6NEstCXApCyJCT5LDX5uVKloAch8/W+kVmPnY= +github.com/DataDog/agent-payload/v5 v5.0.133/go.mod h1:FgVQKmVdqdmZTbxIptqJC/l+xEzdiXsaAOs/vGAvWzs= github.com/DataDog/datadog-agent/cmd/agent/common/path v0.57.1 h1:9WpqKeK4bAc8pSb0sK4fY03bUOqhWUZdGoVh55KBaNI= github.com/DataDog/datadog-agent/cmd/agent/common/path v0.57.1/go.mod h1:NhSO8oDfl4gs8SFyRSWoKxajDjkNmhZV9MEqdr4LQ7g= github.com/DataDog/datadog-agent/comp/api/api/def v0.57.1 h1:fQGQhFD4ELB1L/NrIgHuC1wfhJHLAOZSPidzor034BE= @@ -363,6 +363,8 @@ github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3 github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/ebitengine/purego v0.8.0 h1:JbqvnEzRvPpxhCJzJJ2y0RbiZ8nyjccVUrSM3q+GvvE= +github.com/ebitengine/purego v0.8.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/elastic/go-grok v0.3.1 h1:WEhUxe2KrwycMnlvMimJXvzRa7DoByJB4PVUIE1ZD/U= github.com/elastic/go-grok v0.3.1/go.mod h1:n38ls8ZgOboZRgKcjMY8eFeZFMmcL9n2lP0iHhIDk64= github.com/elastic/lunes v0.1.0 h1:amRtLPjwkWtzDF/RKzcEPMvSsSseLDLW+bnhfNSLRe4= @@ -872,8 +874,8 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= -github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= +github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= +github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -905,8 +907,8 @@ github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xe github.com/shirou/gopsutil/v3 v3.22.12/go.mod h1:Xd7P1kwZcp5VW52+9XsirIKd/BROzbb2wdX3Kqlz9uI= github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI= github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk= -github.com/shirou/gopsutil/v4 v4.24.8 h1:pVQjIenQkIhqO81mwTaXjTzOMT7d3TZkf43PlVFHENI= -github.com/shirou/gopsutil/v4 v4.24.8/go.mod h1:wE0OrJtj4dG+hYkxqDH3QiBICdKSf04/npcvLLc/oRg= +github.com/shirou/gopsutil/v4 v4.24.9 h1:KIV+/HaHD5ka5f570RZq+2SaeFsb/pq+fp2DGNWYoOI= +github.com/shirou/gopsutil/v4 v4.24.9/go.mod h1:3fkaHNeYsUFCGZ8+9vZVWtbyM1k2eRnlL+bWO8Bxa/Q= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v1.7.1 h1:UJcjSAI3aUKx52kfcfhblgyhZceouhvvs3OYdWgn+PY= @@ -1313,8 +1315,8 @@ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/exporter/datadogexporter/integrationtest/go.mod b/exporter/datadogexporter/integrationtest/go.mod index 4dea7ca17ac8..cf5b960d257e 100644 --- a/exporter/datadogexporter/integrationtest/go.mod +++ b/exporter/datadogexporter/integrationtest/go.mod @@ -10,7 +10,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.110.0 github.com/stretchr/testify v1.9.0 - github.com/tinylib/msgp v1.2.1 + github.com/tinylib/msgp v1.2.2 go.opentelemetry.io/collector/component v0.110.0 go.opentelemetry.io/collector/confmap v1.16.0 go.opentelemetry.io/collector/confmap/provider/envprovider v1.16.0 @@ -45,7 +45,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect github.com/Code-Hex/go-generics-cache v1.5.1 // indirect - github.com/DataDog/agent-payload/v5 v5.0.132 // indirect + github.com/DataDog/agent-payload/v5 v5.0.133 // indirect github.com/DataDog/datadog-agent/comp/core/config v0.57.1 // indirect github.com/DataDog/datadog-agent/comp/core/flare/builder v0.57.1 // indirect github.com/DataDog/datadog-agent/comp/core/flare/types v0.57.1 // indirect @@ -142,6 +142,7 @@ require ( github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect + github.com/ebitengine/purego v0.8.0 // indirect github.com/elastic/go-grok v0.3.1 // indirect github.com/elastic/lunes v0.1.0 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect @@ -255,7 +256,7 @@ require ( github.com/ovh/go-ovh v1.6.0 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect github.com/pelletier/go-toml v1.9.5 // indirect - github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 // indirect + github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect @@ -263,7 +264,7 @@ require ( github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect github.com/prometheus/client_golang v1.20.4 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.59.1 // indirect + github.com/prometheus/common v0.60.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/prometheus/prometheus v0.54.1 // indirect @@ -271,7 +272,7 @@ require ( github.com/scaleway/scaleway-sdk-go v1.0.0-beta.29 // indirect github.com/secure-systems-lab/go-securesystemslib v0.7.0 // indirect github.com/shirou/gopsutil/v3 v3.24.5 // indirect - github.com/shirou/gopsutil/v4 v4.24.8 // indirect + github.com/shirou/gopsutil/v4 v4.24.9 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/spf13/afero v1.10.0 // indirect github.com/spf13/cast v1.5.1 // indirect @@ -348,7 +349,7 @@ require ( golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa // indirect golang.org/x/mod v0.20.0 // indirect golang.org/x/net v0.29.0 // indirect - golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.25.0 // indirect golang.org/x/term v0.24.0 // indirect @@ -418,9 +419,6 @@ exclude github.com/DataDog/agent-payload/v5 v5.0.59 // openshift removed all tags from their repo, use the pseudoversion from the release-3.9 branch HEAD replace github.com/openshift/api v3.9.0+incompatible => github.com/openshift/api v0.0.0-20180801171038-322a19404e37 -// It appears that the v0.2.0 tag was modified. Replacing with v0.2.1 -replace github.com/outcaste-io/ristretto v0.2.0 => github.com/outcaste-io/ristretto v0.2.1 - replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest => ../../../pkg/pdatatest replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest => ../../../internal/k8stest diff --git a/exporter/datadogexporter/integrationtest/go.sum b/exporter/datadogexporter/integrationtest/go.sum index f0ad73e08257..a8e04c7650e8 100644 --- a/exporter/datadogexporter/integrationtest/go.sum +++ b/exporter/datadogexporter/integrationtest/go.sum @@ -71,8 +71,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Code-Hex/go-generics-cache v1.5.1 h1:6vhZGc5M7Y/YD8cIUcY8kcuQLB4cHR7U+0KMqAA0KcU= github.com/Code-Hex/go-generics-cache v1.5.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= -github.com/DataDog/agent-payload/v5 v5.0.132 h1:F9wy+iyAgN2QmkEsOlPp3RrQ4vOb4T6k3BXhjSpELS4= -github.com/DataDog/agent-payload/v5 v5.0.132/go.mod h1:FgVQKmVdqdmZTbxIptqJC/l+xEzdiXsaAOs/vGAvWzs= +github.com/DataDog/agent-payload/v5 v5.0.133 h1:3tl5zi6NEstCXApCyJCT5LDX5uVKloAch8/W+kVmPnY= +github.com/DataDog/agent-payload/v5 v5.0.133/go.mod h1:FgVQKmVdqdmZTbxIptqJC/l+xEzdiXsaAOs/vGAvWzs= github.com/DataDog/datadog-agent/cmd/agent/common/path v0.57.1 h1:9WpqKeK4bAc8pSb0sK4fY03bUOqhWUZdGoVh55KBaNI= github.com/DataDog/datadog-agent/cmd/agent/common/path v0.57.1/go.mod h1:NhSO8oDfl4gs8SFyRSWoKxajDjkNmhZV9MEqdr4LQ7g= github.com/DataDog/datadog-agent/comp/api/api/def v0.57.1 h1:fQGQhFD4ELB1L/NrIgHuC1wfhJHLAOZSPidzor034BE= @@ -353,6 +353,8 @@ github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3 github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/ebitengine/purego v0.8.0 h1:JbqvnEzRvPpxhCJzJJ2y0RbiZ8nyjccVUrSM3q+GvvE= +github.com/ebitengine/purego v0.8.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/elastic/go-grok v0.3.1 h1:WEhUxe2KrwycMnlvMimJXvzRa7DoByJB4PVUIE1ZD/U= github.com/elastic/go-grok v0.3.1/go.mod h1:n38ls8ZgOboZRgKcjMY8eFeZFMmcL9n2lP0iHhIDk64= github.com/elastic/lunes v0.1.0 h1:amRtLPjwkWtzDF/RKzcEPMvSsSseLDLW+bnhfNSLRe4= @@ -813,8 +815,8 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 h1:jYi87L8j62qkXzaYHAQAhEapgukhenIMZRBKTNRLHJ4= -github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= +github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c h1:dAMKvw0MlJT1GshSTtih8C2gDs04w8dReiOGXrGLNoY= +github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -856,8 +858,8 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= -github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= +github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= +github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -889,8 +891,8 @@ github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xe github.com/shirou/gopsutil/v3 v3.22.12/go.mod h1:Xd7P1kwZcp5VW52+9XsirIKd/BROzbb2wdX3Kqlz9uI= github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI= github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk= -github.com/shirou/gopsutil/v4 v4.24.8 h1:pVQjIenQkIhqO81mwTaXjTzOMT7d3TZkf43PlVFHENI= -github.com/shirou/gopsutil/v4 v4.24.8/go.mod h1:wE0OrJtj4dG+hYkxqDH3QiBICdKSf04/npcvLLc/oRg= +github.com/shirou/gopsutil/v4 v4.24.9 h1:KIV+/HaHD5ka5f570RZq+2SaeFsb/pq+fp2DGNWYoOI= +github.com/shirou/gopsutil/v4 v4.24.9/go.mod h1:3fkaHNeYsUFCGZ8+9vZVWtbyM1k2eRnlL+bWO8Bxa/Q= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v1.7.1 h1:UJcjSAI3aUKx52kfcfhblgyhZceouhvvs3OYdWgn+PY= @@ -955,8 +957,8 @@ github.com/tidwall/tinylru v1.1.0 h1:XY6IUfzVTU9rpwdhKUF6nQdChgCdGjkMfLzbWyiau6I github.com/tidwall/tinylru v1.1.0/go.mod h1:3+bX+TJ2baOLMWTnlyNWHh4QMnFyARg2TLTQ6OFbzw8= github.com/tidwall/wal v1.1.7 h1:emc1TRjIVsdKKSnpwGBAcsAGg0767SvUk8+ygx7Bb+4= github.com/tidwall/wal v1.1.7/go.mod h1:r6lR1j27W9EPalgHiB7zLJDYu3mzW5BQP5KrzBpYY/E= -github.com/tinylib/msgp v1.2.1 h1:6ypy2qcCznxpP4hpORzhtXyTqrBs7cfM9MCCWY8zsmU= -github.com/tinylib/msgp v1.2.1/go.mod h1:2vIGs3lcUo8izAATNobrCHevYZC/LMsJtw4JPiYPHro= +github.com/tinylib/msgp v1.2.2 h1:iHiBE1tJQwFI740SPEPkGE8cfhNfrqOYRlH450BnC/4= +github.com/tinylib/msgp v1.2.2/go.mod h1:ykjzy2wzgrlvpDCRc4LA8UXy6D8bzMSuAF3WD57Gok0= github.com/tklauser/go-sysconf v0.3.11/go.mod h1:GqXfhXY3kiPa0nAXPDIQIWzJbMCB7AmcWpGR8lSZfqI= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= @@ -1297,8 +1299,8 @@ golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/exporter/dorisexporter/go.mod b/exporter/dorisexporter/go.mod index a0bea8e733d4..c5f5953e8524 100644 --- a/exporter/dorisexporter/go.mod +++ b/exporter/dorisexporter/go.mod @@ -2,8 +2,6 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dorise go 1.22.0 -toolchain go1.22.7 - require ( github.com/cenkalti/backoff/v4 v4.3.0 // cannot use higher version: https://github.com/go-sql-driver/mysql/issues/1602 diff --git a/exporter/elasticsearchexporter/README.md b/exporter/elasticsearchexporter/README.md index 083aa2826182..31d2cae89c6f 100644 --- a/exporter/elasticsearchexporter/README.md +++ b/exporter/elasticsearchexporter/README.md @@ -121,7 +121,7 @@ This can be customised through the following settings: - `logs_dynamic_index` (optional): uses resource, scope, or log record attributes to dynamically construct index name. - `enabled`(default=false): Enable/Disable dynamic index for log records. If `data_stream.dataset` or `data_stream.namespace` exist in attributes (precedence: log record attribute > scope attribute > resource attribute), they will be used to dynamically construct index name in the form `logs-${data_stream.dataset}-${data_stream.namespace}`. Otherwise, if - `elasticsearch.index.prefix` or `elasticsearch.index.suffix` exist in attributes (precedence: resource attribute > scope attribute > log record attribute), they will be used to dynamically construct index name in the form `${elasticsearch.index.prefix}${logs_index}${elasticsearch.index.suffix}`. Otherwise, the index name falls back to `logs-generic-default`, and `logs_index` config will be ignored. Except for prefix/suffix attribute presence, the resulting docs will contain the corresponding `data_stream.*` fields. + `elasticsearch.index.prefix` or `elasticsearch.index.suffix` exist in attributes (precedence: resource attribute > scope attribute > log record attribute), they will be used to dynamically construct index name in the form `${elasticsearch.index.prefix}${logs_index}${elasticsearch.index.suffix}`. Otherwise, if scope name matches regex `/receiver/(\w*receiver)`, `data_stream.dataset` will be capture group #1. Otherwise, the index name falls back to `logs-generic-default`, and `logs_index` config will be ignored. Except for prefix/suffix attribute presence, the resulting docs will contain the corresponding `data_stream.*` fields. - `metrics_index` (optional): The [index] or [data stream] name to publish metrics to. The default value is `metrics-generic-default`. ⚠️ Note that metrics support is currently in development. @@ -129,13 +129,13 @@ This can be customised through the following settings: - `metrics_dynamic_index` (optional): uses resource, scope or data point attributes to dynamically construct index name. ⚠️ Note that metrics support is currently in development. - `enabled`(default=true): Enable/disable dynamic index for metrics. If `data_stream.dataset` or `data_stream.namespace` exist in attributes (precedence: data point attribute > scope attribute > resource attribute), they will be used to dynamically construct index name in the form `metrics-${data_stream.dataset}-${data_stream.namespace}`. Otherwise, if - `elasticsearch.index.prefix` or `elasticsearch.index.suffix` exist in attributes (precedence: resource attribute > scope attribute > data point attribute), they will be used to dynamically construct index name in the form `${elasticsearch.index.prefix}${metrics_index}${elasticsearch.index.suffix}`. Otherwise, the index name falls back to `metrics-generic-default`, and `metrics_index` config will be ignored. Except for prefix/suffix attribute presence, the resulting docs will contain the corresponding `data_stream.*` fields. + `elasticsearch.index.prefix` or `elasticsearch.index.suffix` exist in attributes (precedence: resource attribute > scope attribute > data point attribute), they will be used to dynamically construct index name in the form `${elasticsearch.index.prefix}${metrics_index}${elasticsearch.index.suffix}`. Otherwise, if scope name matches regex `/receiver/(\w*receiver)`, `data_stream.dataset` will be capture group #1. Otherwise, the index name falls back to `metrics-generic-default`, and `metrics_index` config will be ignored. Except for prefix/suffix attribute presence, the resulting docs will contain the corresponding `data_stream.*` fields. - `traces_index`: The [index] or [data stream] name to publish traces to. The default value is `traces-generic-default`. - `traces_dynamic_index` (optional): uses resource, scope, or span attributes to dynamically construct index name. - `enabled`(default=false): Enable/Disable dynamic index for trace spans. If `data_stream.dataset` or `data_stream.namespace` exist in attributes (precedence: span attribute > scope attribute > resource attribute), they will be used to dynamically construct index name in the form `traces-${data_stream.dataset}-${data_stream.namespace}`. Otherwise, if - `elasticsearch.index.prefix` or `elasticsearch.index.suffix` exist in attributes (precedence: resource attribute > scope attribute > span attribute), they will be used to dynamically construct index name in the form `${elasticsearch.index.prefix}${traces_index}${elasticsearch.index.suffix}`. Otherwise, the index name falls back to `traces-generic-default`, and `traces_index` config will be ignored. Except for prefix/suffix attribute presence, the resulting docs will contain the corresponding `data_stream.*` fields. There is an exception for span events under OTel mapping mode (`mapping::mode: otel`), where span event attributes instead of span attributes are considered, and `data_stream.type` is always `logs` instead of `traces` such that documents are routed to `logs-${data_stream.dataset}-${data_stream.namespace}`. + `elasticsearch.index.prefix` or `elasticsearch.index.suffix` exist in attributes (precedence: resource attribute > scope attribute > span attribute), they will be used to dynamically construct index name in the form `${elasticsearch.index.prefix}${traces_index}${elasticsearch.index.suffix}`. Otherwise, if scope name matches regex `/receiver/(\w*receiver)`, `data_stream.dataset` will be capture group #1. Otherwise, the index name falls back to `traces-generic-default`, and `traces_index` config will be ignored. Except for prefix/suffix attribute presence, the resulting docs will contain the corresponding `data_stream.*` fields. There is an exception for span events under OTel mapping mode (`mapping::mode: otel`), where span event attributes instead of span attributes are considered, and `data_stream.type` is always `logs` instead of `traces` such that documents are routed to `logs-${data_stream.dataset}-${data_stream.namespace}`. - `logstash_format` (optional): Logstash format compatibility. Logs, metrics and traces can be written into an index in Logstash format. - `enabled`(default=false): Enable/disable Logstash format compatibility. When `logstash_format.enabled` is `true`, the index name is composed using `(logs|metrics|traces)_index` or `(logs|metrics|traces)_dynamic_index` as prefix and the date as suffix, @@ -235,8 +235,8 @@ The metric types supported are: - Gauge - Sum -- Histogram -- Exponential histogram +- Histogram (Delta temporality only) +- Exponential histogram (Delta temporality only) - Summary [confighttp]: https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/confighttp/README.md#http-configuration-settings diff --git a/exporter/elasticsearchexporter/data_stream_router.go b/exporter/elasticsearchexporter/data_stream_router.go index 851bb92d9756..df9b17c6cc6e 100644 --- a/exporter/elasticsearchexporter/data_stream_router.go +++ b/exporter/elasticsearchexporter/data_stream_router.go @@ -5,18 +5,20 @@ package elasticsearchexporter // import "github.com/open-telemetry/opentelemetry import ( "fmt" + "regexp" "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/plog" - "go.opentelemetry.io/collector/pdata/ptrace" ) +var receiverRegex = regexp.MustCompile(`/receiver/(\w*receiver)`) + func routeWithDefaults(defaultDSType string) func( pcommon.Map, pcommon.Map, pcommon.Map, string, bool, + string, ) string { return func( recordAttr pcommon.Map, @@ -24,11 +26,13 @@ func routeWithDefaults(defaultDSType string) func( resourceAttr pcommon.Map, fIndex string, otel bool, + scopeName string, ) string { // Order: // 1. read data_stream.* from attributes // 2. read elasticsearch.index.* from attributes - // 3. use default hardcoded data_stream.* + // 3. receiver-based routing + // 4. use default hardcoded data_stream.* dataset, datasetExists := getFromAttributes(dataStreamDataset, defaultDataStreamDataset, recordAttr, scopeAttr, resourceAttr) namespace, namespaceExists := getFromAttributes(dataStreamNamespace, defaultDataStreamNamespace, recordAttr, scopeAttr, resourceAttr) dataStreamMode := datasetExists || namespaceExists @@ -40,8 +44,17 @@ func routeWithDefaults(defaultDSType string) func( } } + // Receiver-based routing + // For example, hostmetricsreceiver (or hostmetricsreceiver.otel in the OTel output mode) + // for the scope name + // github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/cpuscraper + if submatch := receiverRegex.FindStringSubmatch(scopeName); len(submatch) > 0 { + receiverName := submatch[1] + dataset = receiverName + } + // The naming convention for datastream is expected to be "logs-[dataset].otel-[namespace]". - // This is in order to match the soon to be built-in logs-*.otel-* index template. + // This is in order to match the built-in logs-*.otel-* index template. if otel { dataset += ".otel" } @@ -53,55 +66,20 @@ func routeWithDefaults(defaultDSType string) func( } } -// routeLogRecord returns the name of the index to send the log record to according to data stream routing attributes and prefix/suffix attributes. -// This function may mutate record attributes. -func routeLogRecord( - record plog.LogRecord, - scope pcommon.InstrumentationScope, - resource pcommon.Resource, - fIndex string, - otel bool, -) string { - route := routeWithDefaults(defaultDataStreamTypeLogs) - return route(record.Attributes(), scope.Attributes(), resource.Attributes(), fIndex, otel) -} +var ( + // routeLogRecord returns the name of the index to send the log record to according to data stream routing related attributes. + // This function may mutate record attributes. + routeLogRecord = routeWithDefaults(defaultDataStreamTypeLogs) -// routeDataPoint returns the name of the index to send the data point to according to data stream routing attributes. -// This function may mutate record attributes. -func routeDataPoint( - dataPoint dataPoint, - scope pcommon.InstrumentationScope, - resource pcommon.Resource, - fIndex string, - otel bool, -) string { - route := routeWithDefaults(defaultDataStreamTypeMetrics) - return route(dataPoint.Attributes(), scope.Attributes(), resource.Attributes(), fIndex, otel) -} + // routeDataPoint returns the name of the index to send the data point to according to data stream routing related attributes. + // This function may mutate record attributes. + routeDataPoint = routeWithDefaults(defaultDataStreamTypeMetrics) -// routeSpan returns the name of the index to send the span to according to data stream routing attributes. -// This function may mutate record attributes. -func routeSpan( - span ptrace.Span, - scope pcommon.InstrumentationScope, - resource pcommon.Resource, - fIndex string, - otel bool, -) string { - route := routeWithDefaults(defaultDataStreamTypeTraces) - return route(span.Attributes(), scope.Attributes(), resource.Attributes(), fIndex, otel) -} + // routeSpan returns the name of the index to send the span to according to data stream routing related attributes. + // This function may mutate record attributes. + routeSpan = routeWithDefaults(defaultDataStreamTypeTraces) -// routeSpanEvent returns the name of the index to send the span event to according to data stream routing attributes. -// This function may mutate record attributes. -func routeSpanEvent( - spanEvent ptrace.SpanEvent, - scope pcommon.InstrumentationScope, - resource pcommon.Resource, - fIndex string, - otel bool, -) string { - // span events are sent to logs-*, not traces-* - route := routeWithDefaults(defaultDataStreamTypeLogs) - return route(spanEvent.Attributes(), scope.Attributes(), resource.Attributes(), fIndex, otel) -} + // routeSpanEvent returns the name of the index to send the span event to according to data stream routing related attributes. + // This function may mutate record attributes. + routeSpanEvent = routeWithDefaults(defaultDataStreamTypeLogs) +) diff --git a/exporter/elasticsearchexporter/data_stream_router_test.go b/exporter/elasticsearchexporter/data_stream_router_test.go index 0d64a6b2184a..81450da4d7a1 100644 --- a/exporter/elasticsearchexporter/data_stream_router_test.go +++ b/exporter/elasticsearchexporter/data_stream_router_test.go @@ -8,70 +8,90 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/pdata/plog" - "go.opentelemetry.io/collector/pdata/pmetric" - "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/pdata/pcommon" ) -type routeTestInfo struct { - name string - otel bool - want string +type routeTestCase struct { + name string + otel bool + scopeName string + want string } -func createRouteTests(dsType string) []routeTestInfo { - renderWantRoute := func(dsType string, otel bool) string { +func createRouteTests(dsType string) []routeTestCase { + renderWantRoute := func(dsType, dsDataset string, otel bool) string { if otel { - return fmt.Sprintf("%s-%s.otel-%s", dsType, defaultDataStreamDataset, defaultDataStreamNamespace) + return fmt.Sprintf("%s-%s.otel-%s", dsType, dsDataset, defaultDataStreamNamespace) } - return fmt.Sprintf("%s-%s-%s", dsType, defaultDataStreamDataset, defaultDataStreamNamespace) + return fmt.Sprintf("%s-%s-%s", dsType, dsDataset, defaultDataStreamNamespace) } - return []routeTestInfo{ + return []routeTestCase{ { name: "default", otel: false, - want: renderWantRoute(dsType, false), + want: renderWantRoute(dsType, defaultDataStreamDataset, false), }, { name: "otel", otel: true, - want: renderWantRoute(dsType, true), + want: renderWantRoute(dsType, defaultDataStreamDataset, true), + }, + { + name: "default with receiver scope name", + otel: false, + scopeName: "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/cpuscraper", + want: renderWantRoute(dsType, "hostmetricsreceiver", false), + }, + { + name: "otel with receiver scope name", + otel: true, + scopeName: "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/cpuscraper", + want: renderWantRoute(dsType, "hostmetricsreceiver", true), + }, + { + name: "default with non-receiver scope name", + otel: false, + scopeName: "some_other_scope_name", + want: renderWantRoute(dsType, defaultDataStreamDataset, false), + }, + { + name: "otel with non-receiver scope name", + otel: true, + scopeName: "some_other_scope_name", + want: renderWantRoute(dsType, defaultDataStreamDataset, true), }, } } func TestRouteLogRecord(t *testing.T) { - tests := createRouteTests(defaultDataStreamTypeLogs) for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { - ds := routeLogRecord(plog.NewLogRecord(), plog.NewScopeLogs().Scope(), plog.NewResourceLogs().Resource(), "", tc.otel) + ds := routeLogRecord(pcommon.NewMap(), pcommon.NewMap(), pcommon.NewMap(), "", tc.otel, tc.scopeName) assert.Equal(t, tc.want, ds) }) } } func TestRouteDataPoint(t *testing.T) { - tests := createRouteTests(defaultDataStreamTypeMetrics) for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { - ds := routeDataPoint(numberDataPoint{pmetric.NewNumberDataPoint()}, plog.NewScopeLogs().Scope(), plog.NewResourceLogs().Resource(), "", tc.otel) + ds := routeDataPoint(pcommon.NewMap(), pcommon.NewMap(), pcommon.NewMap(), "", tc.otel, tc.scopeName) assert.Equal(t, tc.want, ds) }) } } func TestRouteSpan(t *testing.T) { - tests := createRouteTests(defaultDataStreamTypeTraces) for _, tc := range tests { t.Run(tc.name, func(t *testing.T) { - ds := routeSpan(ptrace.NewSpan(), plog.NewScopeLogs().Scope(), plog.NewResourceLogs().Resource(), "", tc.otel) + ds := routeSpan(pcommon.NewMap(), pcommon.NewMap(), pcommon.NewMap(), "", tc.otel, tc.scopeName) assert.Equal(t, tc.want, ds) }) } diff --git a/exporter/elasticsearchexporter/exporter.go b/exporter/elasticsearchexporter/exporter.go index 3c4725cac266..17d2dc8578f0 100644 --- a/exporter/elasticsearchexporter/exporter.go +++ b/exporter/elasticsearchexporter/exporter.go @@ -156,7 +156,7 @@ func (e *elasticsearchExporter) pushLogRecord( ) error { fIndex := e.index if e.dynamicIndex { - fIndex = routeLogRecord(record, scope, resource, fIndex, e.otel) + fIndex = routeLogRecord(record.Attributes(), scope.Attributes(), resource.Attributes(), fIndex, e.otel, scope.Name()) } if e.logstashFormat.Enabled { @@ -223,7 +223,7 @@ func (e *elasticsearchExporter) pushMetricsData( dps := metric.Sum().DataPoints() for l := 0; l < dps.Len(); l++ { dp := dps.At(l) - if err := upsertDataPoint(numberDataPoint{dp}); err != nil { + if err := upsertDataPoint(newNumberDataPoint(dp)); err != nil { errs = append(errs, err) continue } @@ -232,25 +232,33 @@ func (e *elasticsearchExporter) pushMetricsData( dps := metric.Gauge().DataPoints() for l := 0; l < dps.Len(); l++ { dp := dps.At(l) - if err := upsertDataPoint(numberDataPoint{dp}); err != nil { + if err := upsertDataPoint(newNumberDataPoint(dp)); err != nil { errs = append(errs, err) continue } } case pmetric.MetricTypeExponentialHistogram: + if metric.ExponentialHistogram().AggregationTemporality() == pmetric.AggregationTemporalityCumulative { + errs = append(errs, fmt.Errorf("dropping cumulative temporality exponential histogram %q", metric.Name())) + continue + } dps := metric.ExponentialHistogram().DataPoints() for l := 0; l < dps.Len(); l++ { dp := dps.At(l) - if err := upsertDataPoint(exponentialHistogramDataPoint{dp}); err != nil { + if err := upsertDataPoint(newExponentialHistogramDataPoint(dp)); err != nil { errs = append(errs, err) continue } } case pmetric.MetricTypeHistogram: + if metric.Histogram().AggregationTemporality() == pmetric.AggregationTemporalityCumulative { + errs = append(errs, fmt.Errorf("dropping cumulative temporality histogram %q", metric.Name())) + continue + } dps := metric.Histogram().DataPoints() for l := 0; l < dps.Len(); l++ { dp := dps.At(l) - if err := upsertDataPoint(histogramDataPoint{dp}); err != nil { + if err := upsertDataPoint(newHistogramDataPoint(dp)); err != nil { errs = append(errs, err) continue } @@ -259,7 +267,7 @@ func (e *elasticsearchExporter) pushMetricsData( dps := metric.Summary().DataPoints() for l := 0; l < dps.Len(); l++ { dp := dps.At(l) - if err := upsertDataPoint(summaryDataPoint{dp}); err != nil { + if err := upsertDataPoint(newSummaryDataPoint(dp)); err != nil { errs = append(errs, err) continue } @@ -305,7 +313,7 @@ func (e *elasticsearchExporter) getMetricDataPointIndex( ) (string, error) { fIndex := e.index if e.dynamicIndex { - fIndex = routeDataPoint(dataPoint, scope, resource, fIndex, e.otel) + fIndex = routeDataPoint(dataPoint.Attributes(), scope.Attributes(), resource.Attributes(), fIndex, e.otel, scope.Name()) } if e.logstashFormat.Enabled { @@ -379,7 +387,7 @@ func (e *elasticsearchExporter) pushTraceRecord( ) error { fIndex := e.index if e.dynamicIndex { - fIndex = routeSpan(span, scope, resource, fIndex, e.otel) + fIndex = routeSpan(span.Attributes(), scope.Attributes(), resource.Attributes(), fIndex, e.otel, span.Name()) } if e.logstashFormat.Enabled { @@ -409,7 +417,7 @@ func (e *elasticsearchExporter) pushSpanEvent( ) error { fIndex := e.index if e.dynamicIndex { - fIndex = routeSpanEvent(spanEvent, scope, resource, fIndex, e.otel) + fIndex = routeSpanEvent(spanEvent.Attributes(), scope.Attributes(), resource.Attributes(), fIndex, e.otel, scope.Name()) } if e.logstashFormat.Enabled { diff --git a/exporter/elasticsearchexporter/exporter_test.go b/exporter/elasticsearchexporter/exporter_test.go index 3c11272f408f..77ff8e2d0b47 100644 --- a/exporter/elasticsearchexporter/exporter_test.go +++ b/exporter/elasticsearchexporter/exporter_test.go @@ -730,7 +730,9 @@ func TestExporterMetrics(t *testing.T) { metricSlice := scopeA.Metrics() fooMetric := metricSlice.AppendEmpty() fooMetric.SetName("metric.foo") - fooDps := fooMetric.SetEmptyHistogram().DataPoints() + fooHistogram := fooMetric.SetEmptyHistogram() + fooHistogram.SetAggregationTemporality(pmetric.AggregationTemporalityDelta) + fooDps := fooHistogram.DataPoints() fooDp := fooDps.AppendEmpty() fooDp.ExplicitBounds().FromRaw([]float64{1.0, 2.0, 3.0}) fooDp.BucketCounts().FromRaw([]uint64{1, 2, 3, 4}) @@ -774,7 +776,9 @@ func TestExporterMetrics(t *testing.T) { metricSlice := scopeA.Metrics() fooMetric := metricSlice.AppendEmpty() fooMetric.SetName("metric.foo") - fooDps := fooMetric.SetEmptyExponentialHistogram().DataPoints() + fooHistogram := fooMetric.SetEmptyExponentialHistogram() + fooHistogram.SetAggregationTemporality(pmetric.AggregationTemporalityDelta) + fooDps := fooHistogram.DataPoints() fooDp := fooDps.AppendEmpty() fooDp.SetZeroCount(2) fooDp.Positive().SetOffset(1) @@ -797,6 +801,64 @@ func TestExporterMetrics(t *testing.T) { assertItemsEqual(t, expected, rec.Items(), false) }) + t.Run("publish histogram cumulative temporality", func(t *testing.T) { + server := newESTestServer(t, func(_ []itemRequest) ([]itemResponse, error) { + require.Fail(t, "unexpected request") + return nil, nil + }) + + exporter := newTestMetricsExporter(t, server.URL, func(cfg *Config) { + cfg.Mapping.Mode = "ecs" + }) + + metrics := pmetric.NewMetrics() + resourceMetrics := metrics.ResourceMetrics().AppendEmpty() + scopeA := resourceMetrics.ScopeMetrics().AppendEmpty() + metricSlice := scopeA.Metrics() + fooMetric := metricSlice.AppendEmpty() + fooMetric.SetName("metric.foo") + fooHistogram := fooMetric.SetEmptyHistogram() + fooHistogram.SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) + fooDps := fooHistogram.DataPoints() + fooDp := fooDps.AppendEmpty() + fooDp.ExplicitBounds().FromRaw([]float64{1.0, 2.0, 3.0}) + fooDp.BucketCounts().FromRaw([]uint64{1, 2, 3, 4}) + + err := exporter.ConsumeMetrics(context.Background(), metrics) + assert.ErrorContains(t, err, "dropping cumulative temporality histogram \"metric.foo\"") + }) + + t.Run("publish exponential histogram cumulative temporality", func(t *testing.T) { + server := newESTestServer(t, func(_ []itemRequest) ([]itemResponse, error) { + require.Fail(t, "unexpected request") + return nil, nil + }) + + exporter := newTestMetricsExporter(t, server.URL, func(cfg *Config) { + cfg.Mapping.Mode = "ecs" + }) + + metrics := pmetric.NewMetrics() + resourceMetrics := metrics.ResourceMetrics().AppendEmpty() + scopeA := resourceMetrics.ScopeMetrics().AppendEmpty() + metricSlice := scopeA.Metrics() + fooMetric := metricSlice.AppendEmpty() + fooMetric.SetName("metric.foo") + fooHistogram := fooMetric.SetEmptyExponentialHistogram() + fooHistogram.SetAggregationTemporality(pmetric.AggregationTemporalityCumulative) + fooDps := fooHistogram.DataPoints() + fooDp := fooDps.AppendEmpty() + fooDp.SetZeroCount(2) + fooDp.Positive().SetOffset(1) + fooDp.Positive().BucketCounts().FromRaw([]uint64{0, 1, 1, 0}) + + fooDp.Negative().SetOffset(1) + fooDp.Negative().BucketCounts().FromRaw([]uint64{1, 0, 0, 1}) + + err := exporter.ConsumeMetrics(context.Background(), metrics) + assert.ErrorContains(t, err, "dropping cumulative temporality exponential histogram \"metric.foo\"") + }) + t.Run("publish only valid data points", func(t *testing.T) { rec := newBulkRecorder() server := newESTestServer(t, func(docs []itemRequest) ([]itemResponse, error) { @@ -814,7 +876,9 @@ func TestExporterMetrics(t *testing.T) { metricSlice := scopeA.Metrics() fooMetric := metricSlice.AppendEmpty() fooMetric.SetName("metric.foo") - fooDps := fooMetric.SetEmptyHistogram().DataPoints() + fooHistogram := fooMetric.SetEmptyHistogram() + fooHistogram.SetAggregationTemporality(pmetric.AggregationTemporalityDelta) + fooDps := fooHistogram.DataPoints() fooDp := fooDps.AppendEmpty() fooDp.ExplicitBounds().FromRaw([]float64{1.0, 2.0, 3.0}) fooDp.BucketCounts().FromRaw([]uint64{}) @@ -867,7 +931,9 @@ func TestExporterMetrics(t *testing.T) { metricSlice := scopeA.Metrics() fooMetric := metricSlice.AppendEmpty() fooMetric.SetName("metric.foo") - fooDps := fooMetric.SetEmptyHistogram().DataPoints() + fooHistogram := fooMetric.SetEmptyHistogram() + fooHistogram.SetAggregationTemporality(pmetric.AggregationTemporalityDelta) + fooDps := fooHistogram.DataPoints() fooDp := fooDps.AppendEmpty() fooDp.ExplicitBounds().FromRaw([]float64{1.0, 2.0, 3.0}) fooDp.BucketCounts().FromRaw([]uint64{1, 2, 3, 4}) @@ -911,7 +977,7 @@ func TestExporterMetrics(t *testing.T) { Document: []byte(`{"@timestamp":"1970-01-01T01:00:00.000000000Z","data_stream":{"dataset":"generic.otel","namespace":"default","type":"metrics"},"metrics":{"metric.sum":1.5},"resource":{"dropped_attributes_count":0},"scope":{"dropped_attributes_count":0},"start_timestamp":"1970-01-01T02:00:00.000000000Z"}`), }, { - Action: []byte(`{"create":{"_index":"metrics-generic.otel-default","dynamic_templates":{"metrics.metric.summary":"summary_metrics"}}}`), + Action: []byte(`{"create":{"_index":"metrics-generic.otel-default","dynamic_templates":{"metrics.metric.summary":"summary"}}}`), Document: []byte(`{"@timestamp":"1970-01-01T03:00:00.000000000Z","data_stream":{"dataset":"generic.otel","namespace":"default","type":"metrics"},"metrics":{"metric.summary":{"sum":1.5,"value_count":1}},"resource":{"dropped_attributes_count":0},"scope":{"dropped_attributes_count":0},"start_timestamp":"1970-01-01T03:00:00.000000000Z"}`), }, } @@ -947,7 +1013,7 @@ func TestExporterMetrics(t *testing.T) { assert.Equal(t, `{"some.resource.attribute":["foo","bar"]}`, gjson.GetBytes(doc, `resource.attributes`).Raw) }) - t.Run("otel mode _doc_count", func(t *testing.T) { + t.Run("otel mode _doc_count hint", func(t *testing.T) { rec := newBulkRecorder() server := newESTestServer(t, func(docs []itemRequest) ([]itemResponse, error) { rec.Record(docs) @@ -973,25 +1039,75 @@ func TestExporterMetrics(t *testing.T) { summaryDP.SetSum(1) summaryDP.SetCount(10) fillAttributeMap(summaryDP.Attributes(), map[string]any{ - "_doc_count": true, + "elasticsearch.mapping.hints": []string{"_doc_count"}, }) mustSendMetrics(t, exporter, metrics) - rec.WaitItems(2) + rec.WaitItems(1) expected := []itemRequest{ { - Action: []byte(`{"create":{"_index":"metrics-generic.otel-default","dynamic_templates":{"metrics.summary":"summary_metrics"}}}`), - Document: []byte(`{"@timestamp":"1970-01-01T00:00:00.000000000Z","_doc_count":10,"attributes":{"_doc_count":true},"data_stream":{"dataset":"generic.otel","namespace":"default","type":"metrics"},"metrics":{"summary":{"sum":1.0,"value_count":10}},"resource":{"dropped_attributes_count":0},"scope":{"dropped_attributes_count":0}}`), + Action: []byte(`{"create":{"_index":"metrics-generic.otel-default","dynamic_templates":{"metrics.sum":"gauge_long","metrics.summary":"summary"}}}`), + Document: []byte(`{"@timestamp":"1970-01-01T00:00:00.000000000Z","_doc_count":10,"data_stream":{"dataset":"generic.otel","namespace":"default","type":"metrics"},"metrics":{"sum":0,"summary":{"sum":1.0,"value_count":10}},"resource":{"dropped_attributes_count":0},"scope":{"dropped_attributes_count":0}}`), + }, + } + + assertItemsEqual(t, expected, rec.Items(), false) + }) + + t.Run("otel mode aggregate_metric_double hint", func(t *testing.T) { + rec := newBulkRecorder() + server := newESTestServer(t, func(docs []itemRequest) ([]itemResponse, error) { + rec.Record(docs) + return itemsAllOK(docs) + }) + + exporter := newTestMetricsExporter(t, server.URL, func(cfg *Config) { + cfg.Mapping.Mode = "otel" + }) + + metrics := pmetric.NewMetrics() + resourceMetric := metrics.ResourceMetrics().AppendEmpty() + scopeMetric := resourceMetric.ScopeMetrics().AppendEmpty() + + histogramMetric := scopeMetric.Metrics().AppendEmpty() + histogramMetric.SetName("histogram.summary") + fooHistogram := histogramMetric.SetEmptyHistogram() + fooHistogram.SetAggregationTemporality(pmetric.AggregationTemporalityDelta) + fooDp := fooHistogram.DataPoints().AppendEmpty() + fooDp.SetSum(1) + fooDp.SetCount(10) + fillAttributeMap(fooDp.Attributes(), map[string]any{ + "elasticsearch.mapping.hints": []string{"_doc_count", "aggregate_metric_double"}, + }) + + exphistogramMetric := scopeMetric.Metrics().AppendEmpty() + exphistogramMetric.SetName("exphistogram.summary") + fooExpHistogram := exphistogramMetric.SetEmptyExponentialHistogram() + fooExpHistogram.SetAggregationTemporality(pmetric.AggregationTemporalityDelta) + fooExpDp := fooExpHistogram.DataPoints().AppendEmpty() + fooExpDp.SetTimestamp(pcommon.Timestamp(time.Hour)) + fooExpDp.SetSum(1) + fooExpDp.SetCount(10) + fillAttributeMap(fooExpDp.Attributes(), map[string]any{ + "elasticsearch.mapping.hints": []string{"_doc_count", "aggregate_metric_double"}, + }) + + mustSendMetrics(t, exporter, metrics) + + rec.WaitItems(1) + expected := []itemRequest{ + { + Action: []byte(`{"create":{"_index":"metrics-generic.otel-default","dynamic_templates":{"metrics.histogram.summary":"summary"}}}`), + Document: []byte(`{"@timestamp":"1970-01-01T00:00:00.000000000Z","_doc_count":10,"data_stream":{"dataset":"generic.otel","namespace":"default","type":"metrics"},"metrics":{"histogram.summary":{"sum":1.0,"value_count":10}},"resource":{"dropped_attributes_count":0},"scope":{"dropped_attributes_count":0}}`), }, { - Action: []byte(`{"create":{"_index":"metrics-generic.otel-default","dynamic_templates":{"metrics.sum":"gauge_long"}}}`), - Document: []byte(`{"@timestamp":"1970-01-01T00:00:00.000000000Z","data_stream":{"dataset":"generic.otel","namespace":"default","type":"metrics"},"metrics":{"sum":0},"resource":{"dropped_attributes_count":0},"scope":{"dropped_attributes_count":0}}`), + Action: []byte(`{"create":{"_index":"metrics-generic.otel-default","dynamic_templates":{"metrics.exphistogram.summary":"summary"}}}`), + Document: []byte(`{"@timestamp":"1970-01-01T01:00:00.000000000Z","_doc_count":10,"data_stream":{"dataset":"generic.otel","namespace":"default","type":"metrics"},"metrics":{"exphistogram.summary":{"sum":1.0,"value_count":10}},"resource":{"dropped_attributes_count":0},"scope":{"dropped_attributes_count":0}}`), }, } assertItemsEqual(t, expected, rec.Items(), false) - }) t.Run("publish summary", func(t *testing.T) { diff --git a/exporter/elasticsearchexporter/integrationtest/go.mod b/exporter/elasticsearchexporter/integrationtest/go.mod index 61a5e7107377..74a16cc2a48d 100644 --- a/exporter/elasticsearchexporter/integrationtest/go.mod +++ b/exporter/elasticsearchexporter/integrationtest/go.mod @@ -10,7 +10,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/testbed v0.110.0 - github.com/shirou/gopsutil/v4 v4.24.8 + github.com/shirou/gopsutil/v4 v4.24.9 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.110.0 go.opentelemetry.io/collector/component/componentstatus v0.110.0 @@ -41,6 +41,7 @@ require ( github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/ebitengine/purego v0.8.0 // indirect github.com/elastic/elastic-transport-go/v8 v8.6.0 // indirect github.com/elastic/go-elasticsearch/v7 v7.17.10 // indirect github.com/elastic/go-elasticsearch/v8 v8.15.0 // indirect @@ -114,11 +115,9 @@ require ( github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect github.com/prometheus/client_golang v1.20.4 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.59.1 // indirect + github.com/prometheus/common v0.60.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/rs/cors v1.11.1 // indirect - github.com/shoenig/go-m1cpu v0.1.6 // indirect - github.com/shoenig/test v1.7.1 // indirect github.com/soheilhy/cmux v0.1.5 // indirect github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/pflag v1.0.5 // indirect @@ -200,7 +199,7 @@ require ( gonum.org/v1/gonum v0.15.1 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/grpc v1.67.0 // indirect + google.golang.org/grpc v1.67.1 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/exporter/elasticsearchexporter/integrationtest/go.sum b/exporter/elasticsearchexporter/integrationtest/go.sum index dc9c70461f01..c0e97b6904f3 100644 --- a/exporter/elasticsearchexporter/integrationtest/go.sum +++ b/exporter/elasticsearchexporter/integrationtest/go.sum @@ -32,6 +32,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/ebitengine/purego v0.8.0 h1:JbqvnEzRvPpxhCJzJJ2y0RbiZ8nyjccVUrSM3q+GvvE= +github.com/ebitengine/purego v0.8.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/elastic/elastic-transport-go/v8 v8.6.0 h1:Y2S/FBjx1LlCv5m6pWAF2kDJAHoSjSRSJCApolgfthA= github.com/elastic/elastic-transport-go/v8 v8.6.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk= github.com/elastic/go-docappender/v2 v2.3.0 h1:Vr+l36jM+sE/LHp0JFxSIbHlWTSk8CpBblYWZZ/I1KA= @@ -204,8 +206,8 @@ github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/j github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= -github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= +github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= +github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= @@ -217,12 +219,8 @@ github.com/sagikazarmark/locafero v0.4.0 h1:HApY1R9zGo4DBgr7dqsTH/JJxLTTsOt7u6ke github.com/sagikazarmark/locafero v0.4.0/go.mod h1:Pe1W6UlPYUk/+wc/6KFhbORCfqzgYEpgQ3O5fPuL3H4= github.com/sagikazarmark/slog-shim v0.1.0 h1:diDBnUNK9N/354PgrxMywXnAwEr1QZcOr6gto+ugjYE= github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWRIczQRv+GVI1AkeQ= -github.com/shirou/gopsutil/v4 v4.24.8 h1:pVQjIenQkIhqO81mwTaXjTzOMT7d3TZkf43PlVFHENI= -github.com/shirou/gopsutil/v4 v4.24.8/go.mod h1:wE0OrJtj4dG+hYkxqDH3QiBICdKSf04/npcvLLc/oRg= -github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= -github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= -github.com/shoenig/test v1.7.1 h1:UJcjSAI3aUKx52kfcfhblgyhZceouhvvs3OYdWgn+PY= -github.com/shoenig/test v1.7.1/go.mod h1:UxJ6u/x2v/TNs/LoLxBNJRV9DiwBBKYxXSyczsBHFoI= +github.com/shirou/gopsutil/v4 v4.24.9 h1:KIV+/HaHD5ka5f570RZq+2SaeFsb/pq+fp2DGNWYoOI= +github.com/shirou/gopsutil/v4 v4.24.9/go.mod h1:3fkaHNeYsUFCGZ8+9vZVWtbyM1k2eRnlL+bWO8Bxa/Q= github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js= github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo= @@ -524,8 +522,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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 v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/exporter/elasticsearchexporter/mapping_hint.go b/exporter/elasticsearchexporter/mapping_hint.go new file mode 100644 index 000000000000..5362335c7b35 --- /dev/null +++ b/exporter/elasticsearchexporter/mapping_hint.go @@ -0,0 +1,42 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package elasticsearchexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter" + +import ( + "slices" + + "go.opentelemetry.io/collector/pdata/pcommon" +) + +const ( + mappingHintsAttrKey = "elasticsearch.mapping.hints" +) + +type mappingHint string + +const ( + hintAggregateMetricDouble mappingHint = "aggregate_metric_double" + hintDocCount mappingHint = "_doc_count" +) + +type mappingHintGetter struct { + hints []mappingHint +} + +func newMappingHintGetter(attr pcommon.Map) (g mappingHintGetter) { + v, ok := attr.Get(mappingHintsAttrKey) + if !ok || v.Type() != pcommon.ValueTypeSlice { + return + } + slice := v.Slice() + g.hints = slices.Grow(g.hints, slice.Len()) + for i := 0; i < slice.Len(); i++ { + g.hints = append(g.hints, mappingHint(slice.At(i).Str())) + } + return +} + +func (g mappingHintGetter) HasMappingHint(hint mappingHint) bool { + return slices.Contains(g.hints, hint) +} diff --git a/exporter/elasticsearchexporter/mapping_hint_test.go b/exporter/elasticsearchexporter/mapping_hint_test.go new file mode 100644 index 000000000000..00ff4f9b3117 --- /dev/null +++ b/exporter/elasticsearchexporter/mapping_hint_test.go @@ -0,0 +1,88 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package elasticsearchexporter + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/pcommon" +) + +func TestHasHint(t *testing.T) { + tests := []struct { + name string + attrsFunc func() pcommon.Map + hint mappingHint + want bool + }{ + { + name: "empty map", + attrsFunc: pcommon.NewMap, + hint: hintAggregateMetricDouble, + want: false, + }, + { + name: "bad type", + attrsFunc: func() pcommon.Map { + m := pcommon.NewMap() + m.PutBool(mappingHintsAttrKey, true) + return m + }, + hint: hintAggregateMetricDouble, + want: false, + }, + { + name: "bad inner type", + attrsFunc: func() pcommon.Map { + m := pcommon.NewMap() + s := m.PutEmptySlice(mappingHintsAttrKey) + s.AppendEmpty().SetBool(true) + return m + }, + hint: hintAggregateMetricDouble, + want: false, + }, + { + name: "hit", + attrsFunc: func() pcommon.Map { + m := pcommon.NewMap() + s := m.PutEmptySlice(mappingHintsAttrKey) + s.AppendEmpty().SetStr(string(hintAggregateMetricDouble)) + return m + }, + hint: hintAggregateMetricDouble, + want: true, + }, + { + name: "hit 2nd", + attrsFunc: func() pcommon.Map { + m := pcommon.NewMap() + s := m.PutEmptySlice(mappingHintsAttrKey) + s.AppendEmpty().SetStr(string(hintDocCount)) + s.AppendEmpty().SetStr(string(hintAggregateMetricDouble)) + return m + }, + hint: hintAggregateMetricDouble, + want: true, + }, + { + name: "miss", + attrsFunc: func() pcommon.Map { + m := pcommon.NewMap() + s := m.PutEmptySlice(mappingHintsAttrKey) + s.AppendEmpty().SetStr(string(hintDocCount)) + return m + }, + hint: hintAggregateMetricDouble, + want: false, + }, + } + for _, tt := range tests { + tt := tt + t.Run(tt.name, func(t *testing.T) { + assert.Equal(t, tt.want, newMappingHintGetter(tt.attrsFunc()).HasMappingHint(tt.hint)) + }) + } +} diff --git a/exporter/elasticsearchexporter/model.go b/exporter/elasticsearchexporter/model.go index fa0296d3d7a3..ce4b9a3a22da 100644 --- a/exporter/elasticsearchexporter/model.go +++ b/exporter/elasticsearchexporter/model.go @@ -12,6 +12,7 @@ import ( "hash" "hash/fnv" "math" + "slices" "time" "go.opentelemetry.io/collector/pdata/pcommon" @@ -90,6 +91,7 @@ type dataPoint interface { Value() (pcommon.Value, error) DynamicTemplate(pmetric.Metric) string DocCount() uint64 + HasMappingHint(mappingHint) bool } const ( @@ -304,8 +306,7 @@ func (m *encodeModel) upsertMetricDataPointValueOTelMode(documents map[uint32]ob m.encodeScopeOTelMode(&document, scope, scopeSchemaURL) } - // Emit _doc_count if data point contains attribute _doc_count: true - if val, ok := dp.Attributes().Get("_doc_count"); ok && val.Bool() { + if dp.HasMappingHint(hintDocCount) { docCount := dp.DocCount() document.AddInt("_doc_count", int64(docCount)) } @@ -332,6 +333,11 @@ func (m *encodeModel) upsertMetricDataPointValueOTelMode(documents map[uint32]ob type summaryDataPoint struct { pmetric.SummaryDataPoint + mappingHintGetter +} + +func newSummaryDataPoint(dp pmetric.SummaryDataPoint) summaryDataPoint { + return summaryDataPoint{SummaryDataPoint: dp, mappingHintGetter: newMappingHintGetter(dp.Attributes())} } func (dp summaryDataPoint) Value() (pcommon.Value, error) { @@ -345,7 +351,7 @@ func (dp summaryDataPoint) Value() (pcommon.Value, error) { } func (dp summaryDataPoint) DynamicTemplate(_ pmetric.Metric) string { - return "summary_metrics" + return "summary" } func (dp summaryDataPoint) DocCount() uint64 { @@ -354,9 +360,22 @@ func (dp summaryDataPoint) DocCount() uint64 { type exponentialHistogramDataPoint struct { pmetric.ExponentialHistogramDataPoint + mappingHintGetter +} + +func newExponentialHistogramDataPoint(dp pmetric.ExponentialHistogramDataPoint) exponentialHistogramDataPoint { + return exponentialHistogramDataPoint{ExponentialHistogramDataPoint: dp, mappingHintGetter: newMappingHintGetter(dp.Attributes())} } func (dp exponentialHistogramDataPoint) Value() (pcommon.Value, error) { + if dp.HasMappingHint(hintAggregateMetricDouble) { + vm := pcommon.NewValueMap() + m := vm.Map() + m.PutDouble("sum", dp.Sum()) + m.PutInt("value_count", int64(dp.Count())) + return vm, nil + } + counts, values := exphistogram.ToTDigest(dp.ExponentialHistogramDataPoint) vm := pcommon.NewValueMap() @@ -376,6 +395,9 @@ func (dp exponentialHistogramDataPoint) Value() (pcommon.Value, error) { } func (dp exponentialHistogramDataPoint) DynamicTemplate(_ pmetric.Metric) string { + if dp.HasMappingHint(hintAggregateMetricDouble) { + return "summary" + } return "histogram" } @@ -385,13 +407,28 @@ func (dp exponentialHistogramDataPoint) DocCount() uint64 { type histogramDataPoint struct { pmetric.HistogramDataPoint + mappingHintGetter +} + +func newHistogramDataPoint(dp pmetric.HistogramDataPoint) histogramDataPoint { + return histogramDataPoint{HistogramDataPoint: dp, mappingHintGetter: newMappingHintGetter(dp.Attributes())} } func (dp histogramDataPoint) Value() (pcommon.Value, error) { + if dp.HasMappingHint(hintAggregateMetricDouble) { + vm := pcommon.NewValueMap() + m := vm.Map() + m.PutDouble("sum", dp.Sum()) + m.PutInt("value_count", int64(dp.Count())) + return vm, nil + } return histogramToValue(dp.HistogramDataPoint) } func (dp histogramDataPoint) DynamicTemplate(_ pmetric.Metric) string { + if dp.HasMappingHint(hintAggregateMetricDouble) { + return "summary" + } return "histogram" } @@ -449,6 +486,11 @@ func histogramToValue(dp pmetric.HistogramDataPoint) (pcommon.Value, error) { type numberDataPoint struct { pmetric.NumberDataPoint + mappingHintGetter +} + +func newNumberDataPoint(dp pmetric.NumberDataPoint) numberDataPoint { + return numberDataPoint{NumberDataPoint: dp, mappingHintGetter: newMappingHintGetter(dp.Attributes())} } func (dp numberDataPoint) Value() (pcommon.Value, error) { @@ -557,6 +599,8 @@ func (m *encodeModel) encodeAttributesOTelMode(document *objmodel.Document, attr // Move them to the top of the document and remove them from the record document.AddAttribute(key, val) return true + case mappingHintsAttrKey: + return true } return false }) @@ -829,7 +873,7 @@ func metricECSHash(timestamp pcommon.Timestamp, attributes pcommon.Map) uint32 { binary.LittleEndian.PutUint64(timestampBuf, uint64(timestamp)) hasher.Write(timestampBuf) - mapHashExcludeDataStreamAttr(hasher, attributes) + mapHashExcludeReservedAttrs(hasher, attributes) return hasher.Sum32() } @@ -846,20 +890,23 @@ func metricOTelHash(dp dataPoint, scopeAttrs pcommon.Map, unit string) uint32 { hasher.Write([]byte(unit)) - mapHashExcludeDataStreamAttr(hasher, scopeAttrs) - mapHashExcludeDataStreamAttr(hasher, dp.Attributes()) + mapHashExcludeReservedAttrs(hasher, scopeAttrs) + mapHashExcludeReservedAttrs(hasher, dp.Attributes(), mappingHintsAttrKey) return hasher.Sum32() } -// mapHashExcludeDataStreamAttr is mapHash but ignoring DS attributes. -// It is useful for cases where index is already considered during routing and no need to be considered in hashing. -func mapHashExcludeDataStreamAttr(hasher hash.Hash, m pcommon.Map) { +// mapHashExcludeReservedAttrs is mapHash but ignoring some reserved attributes. +// e.g. index is already considered during routing and DS attributes do not need to be considered in hashing +func mapHashExcludeReservedAttrs(hasher hash.Hash, m pcommon.Map, extra ...string) { m.Range(func(k string, v pcommon.Value) bool { switch k { case dataStreamType, dataStreamDataset, dataStreamNamespace: return true } + if slices.Contains(extra, k) { + return true + } hasher.Write([]byte(k)) valueHash(hasher, v) diff --git a/exporter/elasticsearchexporter/model_test.go b/exporter/elasticsearchexporter/model_test.go index e0e719586b61..ec17db600f78 100644 --- a/exporter/elasticsearchexporter/model_test.go +++ b/exporter/elasticsearchexporter/model_test.go @@ -108,7 +108,7 @@ func TestEncodeMetric(t *testing.T) { metrics.ResourceMetrics().At(0).ScopeMetrics().At(0).Scope(), "", metrics.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(0), - numberDataPoint{metrics.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(0).Sum().DataPoints().At(i)}, + newNumberDataPoint(metrics.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(0).Sum().DataPoints().At(i)), ) require.NoError(t, err) } @@ -1055,7 +1055,7 @@ func TestEncodeLogOtelMode(t *testing.T) { record, scope, resource := createTestOTelLogRecord(t, tc.rec) // This sets the data_stream values default or derived from the record/scope/resources - routeLogRecord(record, scope, resource, "", true) + routeLogRecord(record.Attributes(), scope.Attributes(), resource.Attributes(), "", true, scope.Name()) b, err := m.encodeLog(resource, tc.rec.Resource.SchemaURL, record, scope, tc.rec.Scope.SchemaURL) require.NoError(t, err) diff --git a/exporter/googlecloudpubsubexporter/go.mod b/exporter/googlecloudpubsubexporter/go.mod index 288e79011435..321264f18376 100644 --- a/exporter/googlecloudpubsubexporter/go.mod +++ b/exporter/googlecloudpubsubexporter/go.mod @@ -13,15 +13,15 @@ require ( go.opentelemetry.io/collector/exporter v0.110.0 go.opentelemetry.io/collector/pdata v1.16.0 go.uber.org/zap v1.27.0 - google.golang.org/api v0.198.0 - google.golang.org/grpc v1.67.0 + google.golang.org/api v0.199.0 + google.golang.org/grpc v1.67.1 ) require ( cloud.google.com/go v0.115.1 // indirect - cloud.google.com/go/auth v0.9.4 // indirect + cloud.google.com/go/auth v0.9.5 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect - cloud.google.com/go/compute/metadata v0.5.1 // indirect + cloud.google.com/go/compute/metadata v0.5.2 // indirect cloud.google.com/go/iam v1.2.0 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/exporter/googlecloudpubsubexporter/go.sum b/exporter/googlecloudpubsubexporter/go.sum index 88359aef377d..a3f59cefd3bf 100644 --- a/exporter/googlecloudpubsubexporter/go.sum +++ b/exporter/googlecloudpubsubexporter/go.sum @@ -1,12 +1,12 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.115.1 h1:Jo0SM9cQnSkYfp44+v+NQXHpcHqlnRJk2qxh6yvxxxQ= cloud.google.com/go v0.115.1/go.mod h1:DuujITeaufu3gL68/lOFIirVNJwQeyf5UXyi+Wbgknc= -cloud.google.com/go/auth v0.9.4 h1:DxF7imbEbiFu9+zdKC6cKBko1e8XeJnipNqIbWZ+kDI= -cloud.google.com/go/auth v0.9.4/go.mod h1:SHia8n6//Ya940F1rLimhJCjjx7KE17t0ctFEci3HkA= +cloud.google.com/go/auth v0.9.5 h1:4CTn43Eynw40aFVr3GpPqsQponx2jv0BQpjvajsbbzw= +cloud.google.com/go/auth v0.9.5/go.mod h1:Xo0n7n66eHyOWWCnitop6870Ilwo3PiZyodVkkH1xWM= cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= -cloud.google.com/go/compute/metadata v0.5.1 h1:NM6oZeZNlYjiwYje+sYFjEpP0Q0zCan1bmQW/KmIrGs= -cloud.google.com/go/compute/metadata v0.5.1/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= +cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixAHn3fyqngqo= +cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= cloud.google.com/go/iam v1.2.0 h1:kZKMKVNk/IsSSc/udOb83K0hL/Yh/Gcqpz+oAkoIFN8= cloud.google.com/go/iam v1.2.0/go.mod h1:zITGuWgsLZxd8OwAlX+eMFgZDXzBm7icj1PVTYG766Q= cloud.google.com/go/pubsub v1.43.0 h1:s3Qx+F96J7Kwey/uVHdK3QxFLIlOvvw4SfMYw2jFjb4= @@ -226,8 +226,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.198.0 h1:OOH5fZatk57iN0A7tjJQzt6aPfYQ1JiWkt1yGseazks= -google.golang.org/api v0.198.0/go.mod h1:/Lblzl3/Xqqk9hw/yS97TImKTUwnf1bv89v7+OagJzc= +google.golang.org/api v0.199.0 h1:aWUXClp+VFJmqE0JPvpZOK3LDQMyFKYIow4etYd9qxs= +google.golang.org/api v0.199.0/go.mod h1:ohG4qSztDJmZdjK/Ar6MhbAmb/Rpi4JHOqagsh90K28= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -244,8 +244,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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 v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/exporter/kafkaexporter/kafka_exporter_test.go b/exporter/kafkaexporter/kafka_exporter_test.go index 670318887703..c229b2829890 100644 --- a/exporter/kafkaexporter/kafka_exporter_test.go +++ b/exporter/kafkaexporter/kafka_exporter_test.go @@ -131,18 +131,15 @@ func TestNewExporter_err_auth_type(t *testing.T) { texp := newTracesExporter(c, exportertest.NewNopSettings()) require.NotNil(t, texp) err := texp.start(context.Background(), componenttest.NewNopHost()) - assert.Error(t, err) - assert.Contains(t, err.Error(), "failed to load TLS config") + assert.ErrorContains(t, err, "failed to load TLS config") mexp := newMetricsExporter(c, exportertest.NewNopSettings()) require.NotNil(t, mexp) err = mexp.start(context.Background(), componenttest.NewNopHost()) - assert.Error(t, err) - assert.Contains(t, err.Error(), "failed to load TLS config") + assert.ErrorContains(t, err, "failed to load TLS config") lexp := newLogsExporter(c, exportertest.NewNopSettings()) require.NotNil(t, lexp) err = lexp.start(context.Background(), componenttest.NewNopHost()) - assert.Error(t, err) - assert.Contains(t, err.Error(), "failed to load TLS config") + assert.ErrorContains(t, err, "failed to load TLS config") } @@ -157,7 +154,7 @@ func TestNewExporter_err_compression(t *testing.T) { require.NotNil(t, texp) err := texp.start(context.Background(), componenttest.NewNopHost()) assert.Error(t, err) - assert.Contains(t, err.Error(), "producer.compression should be one of 'none', 'gzip', 'snappy', 'lz4', or 'zstd'. configured value idk") + assert.ErrorContains(t, err, "producer.compression should be one of 'none', 'gzip', 'snappy', 'lz4', or 'zstd'. configured value idk") } func TestTracesExporter_encoding_extension(t *testing.T) { @@ -249,8 +246,7 @@ func TestTracesPusher_marshal_error(t *testing.T) { } td := testdata.GenerateTraces(2) err := p.tracesPusher(context.Background(), td) - require.Error(t, err) - assert.Contains(t, err.Error(), expErr.Error()) + assert.ErrorContains(t, err, expErr.Error()) } func TestMetricsDataPusher(t *testing.T) { @@ -331,8 +327,7 @@ func TestMetricsDataPusher_marshal_error(t *testing.T) { } md := testdata.GenerateMetrics(2) err := p.metricsDataPusher(context.Background(), md) - require.Error(t, err) - assert.Contains(t, err.Error(), expErr.Error()) + assert.ErrorContains(t, err, expErr.Error()) } func TestLogsDataPusher(t *testing.T) { @@ -413,8 +408,7 @@ func TestLogsDataPusher_marshal_error(t *testing.T) { } ld := testdata.GenerateLogs(1) err := p.logsDataPusher(context.Background(), ld) - require.Error(t, err) - assert.Contains(t, err.Error(), expErr.Error()) + assert.ErrorContains(t, err, expErr.Error()) } type tracesErrorMarshaler struct { diff --git a/exporter/loadbalancingexporter/go.mod b/exporter/loadbalancingexporter/go.mod index a1a5f03596b7..939b611ca8bb 100644 --- a/exporter/loadbalancingexporter/go.mod +++ b/exporter/loadbalancingexporter/go.mod @@ -3,9 +3,9 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadba go 1.22.0 require ( - github.com/aws/aws-sdk-go-v2/config v1.27.35 - github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.31.8 - github.com/aws/smithy-go v1.20.4 + github.com/aws/aws-sdk-go-v2/config v1.27.39 + github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.32.3 + github.com/aws/smithy-go v1.21.0 github.com/json-iterator/go v1.1.12 github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.110.0 @@ -38,17 +38,17 @@ require ( ) require ( - github.com/aws/aws-sdk-go-v2 v1.30.5 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.33 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17 // indirect + github.com/aws/aws-sdk-go-v2 v1.31.0 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.37 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.22.8 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.8 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.30.8 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.23.3 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.31.3 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect diff --git a/exporter/loadbalancingexporter/go.sum b/exporter/loadbalancingexporter/go.sum index ef3d2547d637..21274bb33b6d 100644 --- a/exporter/loadbalancingexporter/go.sum +++ b/exporter/loadbalancingexporter/go.sum @@ -1,31 +1,31 @@ -github.com/aws/aws-sdk-go-v2 v1.30.5 h1:mWSRTwQAb0aLE17dSzztCVJWI9+cRMgqebndjwDyK0g= -github.com/aws/aws-sdk-go-v2 v1.30.5/go.mod h1:CT+ZPWXbYrci8chcARI3OmI/qgd+f6WtuLOoaIA8PR0= -github.com/aws/aws-sdk-go-v2/config v1.27.35 h1:jeFgiWYNV0vrgdZqB4kZBjYNdy0IKkwrAjr2fwpHIig= -github.com/aws/aws-sdk-go-v2/config v1.27.35/go.mod h1:qnpEvTq8ZfjrCqmJGRfWZuF+lGZ/vG8LK2K0L/TY1gQ= -github.com/aws/aws-sdk-go-v2/credentials v1.17.33 h1:lBHAQQznENv0gLHAZ73ONiTSkCtr8q3pSqWrpbBBZz0= -github.com/aws/aws-sdk-go-v2/credentials v1.17.33/go.mod h1:MBuqCUOT3ChfLuxNDGyra67eskx7ge9e3YKYBce7wpI= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13 h1:pfQ2sqNpMVK6xz2RbqLEL0GH87JOwSxPV2rzm8Zsb74= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13/go.mod h1:NG7RXPUlqfsCLLFfi0+IpKN4sCB9D9fw/qTaSB+xRoU= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17 h1:pI7Bzt0BJtYA0N/JEC6B8fJ4RBrEMi1LBrkMdFYNSnQ= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17/go.mod h1:Dh5zzJYMtxfIjYW+/evjQ8uj2OyR/ve2KROHGHlSFqE= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17 h1:Mqr/V5gvrhA2gvgnF42Zh5iMiQNcOYthFYwCyrnuWlc= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17/go.mod h1:aLJpZlCmjE+V+KtN1q1uyZkfnUWpQGpbsn89XPKyzfU= +github.com/aws/aws-sdk-go-v2 v1.31.0 h1:3V05LbxTSItI5kUqNwhJrrrY1BAXxXt0sN0l72QmG5U= +github.com/aws/aws-sdk-go-v2 v1.31.0/go.mod h1:ztolYtaEUtdpf9Wftr31CJfLVjOnD/CVRkKOOYgF8hA= +github.com/aws/aws-sdk-go-v2/config v1.27.39 h1:FCylu78eTGzW1ynHcongXK9YHtoXD5AiiUqq3YfJYjU= +github.com/aws/aws-sdk-go-v2/config v1.27.39/go.mod h1:wczj2hbyskP4LjMKBEZwPRO1shXY+GsQleab+ZXT2ik= +github.com/aws/aws-sdk-go-v2/credentials v1.17.37 h1:G2aOH01yW8X373JK419THj5QVqu9vKEwxSEsGxihoW0= +github.com/aws/aws-sdk-go-v2/credentials v1.17.37/go.mod h1:0ecCjlb7htYCptRD45lXJ6aJDQac6D2NlKGpZqyTG6A= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 h1:C/d03NAmh8C4BZXhuRNboF/DqhBkBCeDiJDcaqIT5pA= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14/go.mod h1:7I0Ju7p9mCIdlrfS+JCgqcYD0VXz/N4yozsox+0o078= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 h1:kYQ3H1u0ANr9KEKlGs/jTLrBFPo8P8NaH/w7A01NeeM= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18/go.mod h1:r506HmK5JDUh9+Mw4CfGJGSSoqIiLCndAuqXuhbv67Y= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 h1:Z7IdFUONvTcvS7YuhtVxN99v2cCoHRXOS4mTr0B/pUc= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18/go.mod h1:DkKMmksZVVyat+Y+r1dEOgJEfUeA7UngIHWeKsi0yNc= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4 h1:KypMCbLPPHEmf9DgMGw51jMj77VfGPAN2Kv4cfhlfgI= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4/go.mod h1:Vz1JQXliGcQktFTN/LN6uGppAIRoLBR2bMvIMP0gOjc= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19 h1:rfprUlsdzgl7ZL2KlXiUAoJnI/VxfHCvDFr2QDFj6u4= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19/go.mod h1:SCWkEdRq8/7EK60NcvvQ6NXKuTcchAD4ROAsC37VEZE= -github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.31.8 h1:lR2PZfD1YNEPq0TSljh1Zfxmr53FaKZOTf90hQKmH/4= -github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.31.8/go.mod h1:JsD+G3R0ZMWqjt7VDggNsc5SFl4hw+Sk8KQaRN1sltI= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.8 h1:JRwuL+S1Qe1owZQoxblV7ORgRf2o0SrtzDVIbaVCdQ0= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.8/go.mod h1:eEygMHnTKH/3kNp9Jr1n3PdejuSNcgwLe1dWgQtO0VQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.8 h1:+HpGETD9463PFSj7lX5+eq7aLDs85QUIA+NBkeAsscA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.8/go.mod h1:bCbAxKDqNvkHxRaIMnyVPXPo+OaPRwvmgzMxbz1VKSA= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.8 h1:bAi+4p5EKnni+jrfcAhb7iHFQ24bthOAV9t0taf3DCE= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.8/go.mod h1:NXi1dIAGteSaRLqYgarlhP/Ij0cFT+qmCwiJqWh/U5o= -github.com/aws/smithy-go v1.20.4 h1:2HK1zBdPgRbjFOHlfeQZfpC4r72MOb9bZkiFwggKO+4= -github.com/aws/smithy-go v1.20.4/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 h1:QFASJGfT8wMXtuP3D5CRmMjARHv9ZmzFUMJznHDOY3w= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5/go.mod h1:QdZ3OmoIjSX+8D1OPAzPxDfjXASbBMDsz9qvtyIhtik= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 h1:Xbwbmk44URTiHNx6PNo0ujDE6ERlsCKJD3u1zfnzAPg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20/go.mod h1:oAfOFzUB14ltPZj1rWwRc3d/6OgD76R8KlvU3EqM9Fg= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.32.3 h1:55Y/RewMJExiMaz4SUl9ZfjgM4Fi/caaN6wVJ+i3lto= +github.com/aws/aws-sdk-go-v2/service/servicediscovery v1.32.3/go.mod h1:hbMVfSdZneCht4UmPOsejDt93QnetQPFuLOOqbuybqs= +github.com/aws/aws-sdk-go-v2/service/sso v1.23.3 h1:rs4JCczF805+FDv2tRhZ1NU0RB2H6ryAvsWPanAr72Y= +github.com/aws/aws-sdk-go-v2/service/sso v1.23.3/go.mod h1:XRlMvmad0ZNL+75C5FYdMvbbLkd6qiqz6foR1nA1PXY= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3 h1:S7EPdMVZod8BGKQQPTBK+FcX9g7bKR7c4+HxWqHP7Vg= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3/go.mod h1:FnvDM4sfa+isJ3kDXIzAB9GAwVSzFzSy97uZ3IsHo4E= +github.com/aws/aws-sdk-go-v2/service/sts v1.31.3 h1:VzudTFrDCIDakXtemR7l6Qzt2+JYsVqo2MxBPt5k8T8= +github.com/aws/aws-sdk-go-v2/service/sts v1.31.3/go.mod h1:yMWe0F+XG0DkRZK5ODZhG7BEFYhLXi2dqGsv6tX0cgI= +github.com/aws/smithy-go v1.21.0 h1:H7L8dtDRk0P1Qm6y0ji7MCYMQObJ5R9CRpyPhRUkLYA= +github.com/aws/smithy-go v1.21.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= diff --git a/exporter/lokiexporter/config_test.go b/exporter/lokiexporter/config_test.go index 0e5dbc510122..caf6ee5a120e 100644 --- a/exporter/lokiexporter/config_test.go +++ b/exporter/lokiexporter/config_test.go @@ -122,8 +122,7 @@ func TestConfigValidate(t *testing.T) { t.Run(tc.desc, func(t *testing.T) { err := tc.cfg.Validate() if tc.err != nil { - require.Error(t, err) - assert.Contains(t, err.Error(), tc.err.Error()) + assert.ErrorContains(t, err, tc.err.Error()) } else { require.NoError(t, err) } diff --git a/exporter/lokiexporter/go.mod b/exporter/lokiexporter/go.mod index a7093791663c..0292aa15460e 100644 --- a/exporter/lokiexporter/go.mod +++ b/exporter/lokiexporter/go.mod @@ -8,7 +8,7 @@ require ( github.com/golang/snappy v0.0.4 github.com/grafana/loki/pkg/push v0.0.0-20240514112848-a1b1eeb09583 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/loki v0.110.0 - github.com/prometheus/common v0.59.1 + github.com/prometheus/common v0.60.0 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/client v1.16.0 go.opentelemetry.io/collector/component v0.110.0 @@ -57,7 +57,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.110.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.110.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.20.3 // indirect + github.com/prometheus/client_golang v1.20.4 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/prometheus/prometheus v0.54.1 // indirect diff --git a/exporter/lokiexporter/go.sum b/exporter/lokiexporter/go.sum index 38f0af7042d9..b377d6fb6700 100644 --- a/exporter/lokiexporter/go.sum +++ b/exporter/lokiexporter/go.sum @@ -98,12 +98,12 @@ github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjL github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.20.3 h1:oPksm4K8B+Vt35tUhw6GbSNSgVlVSBH0qELP/7u83l4= -github.com/prometheus/client_golang v1.20.3/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= +github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= -github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= +github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= +github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= @@ -213,8 +213,8 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= -golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= 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= diff --git a/exporter/opencensusexporter/go.mod b/exporter/opencensusexporter/go.mod index e8ac60dd7e1e..d0c39006d6d1 100644 --- a/exporter/opencensusexporter/go.mod +++ b/exporter/opencensusexporter/go.mod @@ -21,7 +21,7 @@ require ( go.opentelemetry.io/collector/pdata/testdata v0.110.0 go.opentelemetry.io/collector/receiver v0.110.0 go.uber.org/goleak v1.3.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 ) require ( diff --git a/exporter/opencensusexporter/go.sum b/exporter/opencensusexporter/go.sum index a06ef47184b3..838815e931d6 100644 --- a/exporter/opencensusexporter/go.sum +++ b/exporter/opencensusexporter/go.sum @@ -253,8 +253,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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 v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/exporter/otelarrowexporter/go.mod b/exporter/otelarrowexporter/go.mod index 41ee38705824..db91c3ab6eaf 100644 --- a/exporter/otelarrowexporter/go.mod +++ b/exporter/otelarrowexporter/go.mod @@ -6,7 +6,7 @@ require ( github.com/apache/arrow/go/v16 v16.1.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/grpcutil v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow v0.110.0 - github.com/open-telemetry/otel-arrow v0.26.0 + github.com/open-telemetry/otel-arrow v0.27.0 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/client v1.16.0 go.opentelemetry.io/collector/component v0.110.0 @@ -30,7 +30,7 @@ require ( go.uber.org/zap v1.27.0 golang.org/x/net v0.29.0 google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 google.golang.org/protobuf v1.34.2 ) diff --git a/exporter/otelarrowexporter/go.sum b/exporter/otelarrowexporter/go.sum index e9a5d5d11707..c0c63c1f3e36 100644 --- a/exporter/otelarrowexporter/go.sum +++ b/exporter/otelarrowexporter/go.sum @@ -80,8 +80,8 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/mostynb/go-grpc-compression v1.2.3 h1:42/BKWMy0KEJGSdWvzqIyOZ95YcR9mLPqKctH7Uo//I= github.com/mostynb/go-grpc-compression v1.2.3/go.mod h1:AghIxF3P57umzqM9yz795+y1Vjs47Km/Y2FE6ouQ7Lg= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/open-telemetry/otel-arrow v0.26.0 h1:zizyFFtYfVzkjXGtY5iFSR5ognddzwJlD8fGPsVgCLo= -github.com/open-telemetry/otel-arrow v0.26.0/go.mod h1:QGueLcxK3nVjRnVCevyyeCEnI2YkFqgT/TWgw58eVy4= +github.com/open-telemetry/otel-arrow v0.27.0 h1:dxEaCM1epON+iauCNvju/uxeChLwz5u4ifAY3BdjWFU= +github.com/open-telemetry/otel-arrow v0.27.0/go.mod h1:QGueLcxK3nVjRnVCevyyeCEnI2YkFqgT/TWgw58eVy4= 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= @@ -242,8 +242,8 @@ gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6d gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/exporter/otelarrowexporter/internal/arrow/stream_test.go b/exporter/otelarrowexporter/internal/arrow/stream_test.go index 9b39d4d9c644..5b38bd3071fc 100644 --- a/exporter/otelarrowexporter/internal/arrow/stream_test.go +++ b/exporter/otelarrowexporter/internal/arrow/stream_test.go @@ -247,12 +247,10 @@ func TestStreamStatusUnavailableInvalid(t *testing.T) { }() // sender should get "test unavailable" once, success second time. err := tc.mustSendAndWait() - require.Error(t, err) - require.Contains(t, err.Error(), "test unavailable") + require.ErrorContains(t, err, "test unavailable") err = tc.mustSendAndWait() - require.Error(t, err) - require.Contains(t, err.Error(), "test invalid") + require.ErrorContains(t, err, "test invalid") err = tc.mustSendAndWait() require.NoError(t, err) @@ -282,8 +280,7 @@ func TestStreamStatusUnrecognized(t *testing.T) { channel.recv <- statusUnrecognizedFor(batch.BatchId) }() err := tc.mustSendAndWait() - require.Error(t, err) - require.Contains(t, err.Error(), "test unrecognized") + require.ErrorContains(t, err, "test unrecognized") // Note: do not cancel the context, the stream should be // shutting down due to the error. diff --git a/exporter/otelarrowexporter/metadata_test.go b/exporter/otelarrowexporter/metadata_test.go index ce18b5f1dee2..e450f284fbc6 100644 --- a/exporter/otelarrowexporter/metadata_test.go +++ b/exporter/otelarrowexporter/metadata_test.go @@ -121,9 +121,8 @@ func TestDuplicateMetadataKeys(t *testing.T) { cfg := createDefaultConfig().(*Config) cfg.MetadataKeys = []string{"myTOKEN", "mytoken"} err := cfg.Validate() - require.Error(t, err) - require.Contains(t, err.Error(), "duplicate") - require.Contains(t, err.Error(), "mytoken") + require.ErrorContains(t, err, "duplicate") + require.ErrorContains(t, err, "mytoken") } func TestMetadataExporterCardinalityLimit(t *testing.T) { @@ -196,7 +195,7 @@ func TestMetadataExporterCardinalityLimit(t *testing.T) { err = exp.ConsumeTraces(ctx, td) require.Error(t, err) assert.True(t, consumererror.IsPermanent(err)) - assert.Contains(t, err.Error(), "too many") + assert.ErrorContains(t, err, "too many") assert.Eventually(t, func() bool { return rcv.requestCount.Load() == int32(cardLimit) diff --git a/exporter/otelarrowexporter/otelarrow_test.go b/exporter/otelarrowexporter/otelarrow_test.go index 4c73c153f342..4ae4c6b7d9b8 100644 --- a/exporter/otelarrowexporter/otelarrow_test.go +++ b/exporter/otelarrowexporter/otelarrow_test.go @@ -1133,8 +1133,7 @@ func TestSendArrowFailedTraces(t *testing.T) { // Send two trace items. td := testdata.GenerateTraces(2) err = exp.ConsumeTraces(context.Background(), td) - assert.Error(t, err) - assert.Contains(t, err.Error(), "test failed") + assert.ErrorContains(t, err, "test failed") // Wait until it is received. assert.Eventually(t, func() bool { diff --git a/exporter/prometheusexporter/go.mod b/exporter/prometheusexporter/go.mod index facec33eb1ce..2c4a0ea4dea4 100644 --- a/exporter/prometheusexporter/go.mod +++ b/exporter/prometheusexporter/go.mod @@ -9,7 +9,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.110.0 github.com/prometheus/client_golang v1.20.4 github.com/prometheus/client_model v0.6.1 - github.com/prometheus/common v0.59.1 + github.com/prometheus/common v0.60.0 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.110.0 go.opentelemetry.io/collector/config/confighttp v0.110.0 @@ -172,7 +172,7 @@ require ( golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/mod v0.19.0 // indirect golang.org/x/net v0.29.0 // indirect - golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.25.0 // indirect golang.org/x/term v0.24.0 // indirect diff --git a/exporter/prometheusexporter/go.sum b/exporter/prometheusexporter/go.sum index 71ca6bf022fa..631c27bdb2d8 100644 --- a/exporter/prometheusexporter/go.sum +++ b/exporter/prometheusexporter/go.sum @@ -481,8 +481,8 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= -github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= +github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= +github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -796,8 +796,8 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/exporter/prometheusremotewriteexporter/go.mod b/exporter/prometheusremotewriteexporter/go.mod index 85e6086642cd..adb0a42f11ed 100644 --- a/exporter/prometheusremotewriteexporter/go.mod +++ b/exporter/prometheusremotewriteexporter/go.mod @@ -55,7 +55,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.59.1 // indirect + github.com/prometheus/common v0.60.0 // indirect github.com/rs/cors v1.11.1 // indirect github.com/tidwall/gjson v1.10.2 // indirect github.com/tidwall/match v1.1.1 // indirect diff --git a/exporter/prometheusremotewriteexporter/go.sum b/exporter/prometheusremotewriteexporter/go.sum index 49f3e58241c9..bce333934a2d 100644 --- a/exporter/prometheusremotewriteexporter/go.sum +++ b/exporter/prometheusremotewriteexporter/go.sum @@ -60,8 +60,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/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= -github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= +github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= +github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/prometheus v0.54.1 h1:vKuwQNjnYN2/mDoWfHXDhAsz/68q/dQDb+YbcEqU7MQ= github.com/prometheus/prometheus v0.54.1/go.mod h1:xlLByHhk2g3ycakQGrMaU8K7OySZx98BzeCR99991NY= github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= diff --git a/exporter/pulsarexporter/go.mod b/exporter/pulsarexporter/go.mod index fb803ebff12a..ee358d1cd76f 100644 --- a/exporter/pulsarexporter/go.mod +++ b/exporter/pulsarexporter/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/pulsar go 1.22.0 require ( - github.com/apache/pulsar-client-go v0.13.1 + github.com/apache/pulsar-client-go v0.14.0 github.com/cenkalti/backoff/v4 v4.3.0 github.com/gogo/protobuf v1.3.2 github.com/jaegertracing/jaeger v1.61.0 diff --git a/exporter/pulsarexporter/go.sum b/exporter/pulsarexporter/go.sum index 6df6895c514a..db4dd97ae2b4 100644 --- a/exporter/pulsarexporter/go.sum +++ b/exporter/pulsarexporter/go.sum @@ -15,8 +15,8 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/Microsoft/hcsshim v0.11.5 h1:haEcLNpj9Ka1gd3B3tAEs9CpE0c+1IhoL59w/exYU38= github.com/Microsoft/hcsshim v0.11.5/go.mod h1:MV8xMfmECjl5HdO7U/3/hFVnkmSBjAjmA09d4bExKcU= -github.com/apache/pulsar-client-go v0.13.1 h1:XAAKXjF99du7LP6qu/nBII1HC2nS483/vQoQIWmm5Yg= -github.com/apache/pulsar-client-go v0.13.1/go.mod h1:0X5UCs+Cv5w6Ds38EZebUMfyVUFIh+URF2BeipEVhIU= +github.com/apache/pulsar-client-go v0.14.0 h1:P7yfAQhQ52OCAu8yVmtdbNQ81vV8bF54S2MLmCPJC9w= +github.com/apache/pulsar-client-go v0.14.0/go.mod h1:PNUE29x9G1EHMvm41Bs2vcqwgv7N8AEjeej+nEVYbX8= github.com/apache/thrift v0.20.0 h1:631+KvYbsBZxmuJjYwhezVsrfc/TbqtZV4QcxOX1fOI= github.com/apache/thrift v0.20.0/go.mod h1:hOk1BQqcp2OLzGsyVXdfMk7YFlMxK3aoEVhjD06QhB8= github.com/ardielle/ardielle-go v1.5.2 h1:TilHTpHIQJ27R1Tl/iITBzMwiUGSlVfiVhwDNGM3Zj4= @@ -50,8 +50,8 @@ github.com/dimfeld/httptreemux v5.0.1+incompatible h1:Qj3gVcDNoOthBAqftuD596rm4w github.com/dimfeld/httptreemux v5.0.1+incompatible/go.mod h1:rbUlSV+CCpv/SuqUTP/8Bk2O3LyUV436/yaRGkhP6Z0= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v27.0.3+incompatible h1:aBGI9TeQ4MPlhquTQKq9XbK79rKFVwXNUAYz9aXyEBE= -github.com/docker/docker v27.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.1.1+incompatible h1:hO/M4MtV36kzKldqnA37IWhebRA+LnqqcqDja6kVaKY= +github.com/docker/docker v27.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= diff --git a/exporter/signalfxexporter/config_test.go b/exporter/signalfxexporter/config_test.go index 128609cc5260..0a60a9aff521 100644 --- a/exporter/signalfxexporter/config_test.go +++ b/exporter/signalfxexporter/config_test.go @@ -4,6 +4,7 @@ package signalfxexporter import ( + "net/http" "net/url" "path/filepath" "testing" @@ -38,6 +39,10 @@ func TestLoadConfig(t *testing.T) { seventy := 70 hundred := 100 idleConnTimeout := 30 * time.Second + defaultMaxIdleConns := http.DefaultTransport.(*http.Transport).MaxIdleConns + defaultMaxIdleConnsPerHost := http.DefaultTransport.(*http.Transport).MaxIdleConnsPerHost + defaultMaxConnsPerHost := http.DefaultTransport.(*http.Transport).MaxConnsPerHost + defaultIdleConnTimeout := http.DefaultTransport.(*http.Transport).IdleConnTimeout tests := []struct { id component.ID @@ -50,9 +55,10 @@ func TestLoadConfig(t *testing.T) { Realm: "ap0", ClientConfig: confighttp.ClientConfig{ Timeout: 10 * time.Second, - Headers: nil, + Headers: map[string]configopaque.String{}, MaxIdleConns: &hundred, MaxIdleConnsPerHost: &hundred, + MaxConnsPerHost: &defaultMaxConnsPerHost, IdleConnTimeout: &idleConnTimeout, HTTP2ReadIdleTimeout: 10 * time.Second, HTTP2PingTimeout: 10 * time.Second, @@ -86,8 +92,13 @@ func TestLoadConfig(t *testing.T) { ExcludeProperties: nil, Correlation: &correlation.Config{ ClientConfig: confighttp.ClientConfig{ - Endpoint: "", - Timeout: 5 * time.Second, + Endpoint: "", + Timeout: 5 * time.Second, + Headers: map[string]configopaque.String{}, + MaxIdleConns: &defaultMaxIdleConns, + MaxIdleConnsPerHost: &defaultMaxIdleConnsPerHost, + MaxConnsPerHost: &defaultMaxConnsPerHost, + IdleConnTimeout: &defaultIdleConnTimeout, }, StaleServiceTimeout: 5 * time.Minute, SyncAttributes: map[string]string{ @@ -120,6 +131,7 @@ func TestLoadConfig(t *testing.T) { }, MaxIdleConns: &seventy, MaxIdleConnsPerHost: &seventy, + MaxConnsPerHost: &defaultMaxConnsPerHost, IdleConnTimeout: &idleConnTimeout, HTTP2ReadIdleTimeout: 10 * time.Second, HTTP2PingTimeout: 10 * time.Second, @@ -246,8 +258,13 @@ func TestLoadConfig(t *testing.T) { }, Correlation: &correlation.Config{ ClientConfig: confighttp.ClientConfig{ - Endpoint: "", - Timeout: 5 * time.Second, + Endpoint: "", + Timeout: 5 * time.Second, + Headers: map[string]configopaque.String{}, + MaxIdleConns: &defaultMaxIdleConns, + MaxIdleConnsPerHost: &defaultMaxIdleConnsPerHost, + MaxConnsPerHost: &defaultMaxConnsPerHost, + IdleConnTimeout: &defaultIdleConnTimeout, }, StaleServiceTimeout: 5 * time.Minute, SyncAttributes: map[string]string{ diff --git a/exporter/signalfxexporter/exporter_test.go b/exporter/signalfxexporter/exporter_test.go index a2cb4b1e0a70..07dc89f29d9a 100644 --- a/exporter/signalfxexporter/exporter_test.go +++ b/exporter/signalfxexporter/exporter_test.go @@ -218,7 +218,7 @@ func TestConsumeMetrics(t *testing.T) { assert.Error(t, err) assert.True(t, consumererror.IsPermanent(err)) assert.True(t, strings.HasPrefix(err.Error(), tt.expectedErrorMsg)) - assert.Contains(t, err.Error(), "response content") + assert.ErrorContains(t, err, "response content") return } @@ -1843,7 +1843,7 @@ func TestConsumeMixedMetrics(t *testing.T) { assert.Error(t, err) assert.True(t, consumererror.IsPermanent(err)) assert.True(t, strings.HasPrefix(err.Error(), tt.expectedErrorMsg)) - assert.Contains(t, err.Error(), "response content") + assert.ErrorContains(t, err, "response content") return } diff --git a/exporter/signalfxexporter/factory.go b/exporter/signalfxexporter/factory.go index 2a96dde95cca..dd5e6fe57b6a 100644 --- a/exporter/signalfxexporter/factory.go +++ b/exporter/signalfxexporter/factory.go @@ -50,18 +50,18 @@ func createDefaultConfig() component.Config { maxConnCount := defaultMaxConns idleConnTimeout := 30 * time.Second timeout := 10 * time.Second + clientConfig := confighttp.NewDefaultClientConfig() + clientConfig.Timeout = defaultHTTPTimeout + clientConfig.MaxIdleConns = &maxConnCount + clientConfig.MaxIdleConnsPerHost = &maxConnCount + clientConfig.IdleConnTimeout = &idleConnTimeout + clientConfig.HTTP2ReadIdleTimeout = defaultHTTP2ReadIdleTimeout + clientConfig.HTTP2PingTimeout = defaultHTTP2PingTimeout return &Config{ BackOffConfig: configretry.NewDefaultBackOffConfig(), QueueSettings: exporterhelper.NewDefaultQueueConfig(), - ClientConfig: confighttp.ClientConfig{ - Timeout: defaultHTTPTimeout, - MaxIdleConns: &maxConnCount, - MaxIdleConnsPerHost: &maxConnCount, - IdleConnTimeout: &idleConnTimeout, - HTTP2ReadIdleTimeout: defaultHTTP2ReadIdleTimeout, - HTTP2PingTimeout: defaultHTTP2PingTimeout, - }, + ClientConfig: clientConfig, AccessTokenPassthroughConfig: splunk.AccessTokenPassthroughConfig{ AccessTokenPassthrough: true, }, diff --git a/exporter/signalfxexporter/factory_test.go b/exporter/signalfxexporter/factory_test.go index e762f179ee4f..eac89f009426 100644 --- a/exporter/signalfxexporter/factory_test.go +++ b/exporter/signalfxexporter/factory_test.go @@ -600,7 +600,7 @@ func TestDefaultExcludes_not_translated(t *testing.T) { require.NoError(t, err) md := getMetrics(metrics) - require.Equal(t, 69, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().Len()) + require.Equal(t, 68, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().Len()) dps := converter.MetricsToSignalFxV2(md) require.Empty(t, dps) } diff --git a/exporter/signalfxexporter/go.mod b/exporter/signalfxexporter/go.mod index dfa6960592f6..ada29f2f34f3 100644 --- a/exporter/signalfxexporter/go.mod +++ b/exporter/signalfxexporter/go.mod @@ -14,7 +14,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.110.0 - github.com/shirou/gopsutil/v4 v4.24.8 + github.com/shirou/gopsutil/v4 v4.24.9 github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.110.0 @@ -37,6 +37,7 @@ require ( require ( github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/ebitengine/purego v0.8.0 // indirect github.com/elastic/lunes v0.1.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect @@ -62,7 +63,6 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/rs/cors v1.11.1 // indirect - github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect diff --git a/exporter/signalfxexporter/go.sum b/exporter/signalfxexporter/go.sum index 2d1a0028d7bc..d3fdb5b2f68a 100644 --- a/exporter/signalfxexporter/go.sum +++ b/exporter/signalfxexporter/go.sum @@ -5,6 +5,8 @@ github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL 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/ebitengine/purego v0.8.0 h1:JbqvnEzRvPpxhCJzJJ2y0RbiZ8nyjccVUrSM3q+GvvE= +github.com/ebitengine/purego v0.8.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/elastic/lunes v0.1.0 h1:amRtLPjwkWtzDF/RKzcEPMvSsSseLDLW+bnhfNSLRe4= github.com/elastic/lunes v0.1.0/go.mod h1:xGphYIt3XdZRtyWosHQTErsQTd4OP1p9wsbVoHelrd4= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= @@ -80,12 +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/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.8 h1:pVQjIenQkIhqO81mwTaXjTzOMT7d3TZkf43PlVFHENI= -github.com/shirou/gopsutil/v4 v4.24.8/go.mod h1:wE0OrJtj4dG+hYkxqDH3QiBICdKSf04/npcvLLc/oRg= -github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= -github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= -github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= -github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= +github.com/shirou/gopsutil/v4 v4.24.9 h1:KIV+/HaHD5ka5f570RZq+2SaeFsb/pq+fp2DGNWYoOI= +github.com/shirou/gopsutil/v4 v4.24.9/go.mod h1:3fkaHNeYsUFCGZ8+9vZVWtbyM1k2eRnlL+bWO8Bxa/Q= github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 h1:32k2QLgsKhcEs55q4REPKyIadvid5FPy2+VMgvbmKJ0= github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3/go.mod h1:gJrXWi7wSGXfiC7+VheQaz+ypdCt5SmZNL+BRxUe7y4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/exporter/signalfxexporter/internal/correlation/config.go b/exporter/signalfxexporter/internal/correlation/config.go index 1f7e5e0378e5..0c69af3749a0 100644 --- a/exporter/signalfxexporter/internal/correlation/config.go +++ b/exporter/signalfxexporter/internal/correlation/config.go @@ -16,8 +16,10 @@ import ( // DefaultConfig returns default configuration correlation values. func DefaultConfig() *Config { + clientConfig := confighttp.NewDefaultClientConfig() + clientConfig.Timeout = 5 * time.Second return &Config{ - ClientConfig: confighttp.ClientConfig{Timeout: 5 * time.Second}, + ClientConfig: clientConfig, StaleServiceTimeout: 5 * time.Minute, SyncAttributes: map[string]string{ conventions.AttributeK8SPodUID: conventions.AttributeK8SPodUID, diff --git a/exporter/signalfxexporter/internal/correlation/correlation_test.go b/exporter/signalfxexporter/internal/correlation/correlation_test.go index dba4f06a0f34..da3e922d47fd 100644 --- a/exporter/signalfxexporter/internal/correlation/correlation_test.go +++ b/exporter/signalfxexporter/internal/correlation/correlation_test.go @@ -81,7 +81,7 @@ func TestTrackerStart(t *testing.T) { if tt.wantErr { require.Error(t, err) if tt.errMsg != "" { - require.Contains(t, err.Error(), tt.errMsg) + require.ErrorContains(t, err, tt.errMsg) } } else { require.NoError(t, err) diff --git a/exporter/signalfxexporter/internal/translation/default_metrics.go b/exporter/signalfxexporter/internal/translation/default_metrics.go index d0d5fc71156b..14e94d853108 100644 --- a/exporter/signalfxexporter/internal/translation/default_metrics.go +++ b/exporter/signalfxexporter/internal/translation/default_metrics.go @@ -121,7 +121,7 @@ exclude_metrics: - /^(?i:(container)|(k8s\.node)|(k8s\.pod))\.memory\.page_faults$/ - /^(?i:(container)|(k8s\.node)|(k8s\.pod))\.memory\.rss$/ - /^(?i:(k8s\.node)|(k8s\.pod))\.memory\.usage$/ - - /^(?i:(container)|(k8s\.node)|(k8s\.pod))\.memory\.working_set$/ + - /^(?i:(k8s\.node)|(k8s\.pod))\.memory\.working_set$/ # matches (k8s.node|k8s.pod).filesystem... - /^k8s\.(?i:(node)|(pod))\.filesystem\.available$/ diff --git a/exporter/signalfxexporter/testdata/json/non_default_metrics_otel_convention.json b/exporter/signalfxexporter/testdata/json/non_default_metrics_otel_convention.json index e9ea9839db75..fc996acca3df 100644 --- a/exporter/signalfxexporter/testdata/json/non_default_metrics_otel_convention.json +++ b/exporter/signalfxexporter/testdata/json/non_default_metrics_otel_convention.json @@ -131,9 +131,6 @@ { "container.memory.rss": null }, - { - "container.memory.working_set": null - }, { "k8s.pod.memory.available": null }, diff --git a/exporter/splunkhecexporter/client_test.go b/exporter/splunkhecexporter/client_test.go index 7dacd2f297bd..1812e0b97bd6 100644 --- a/exporter/splunkhecexporter/client_test.go +++ b/exporter/splunkhecexporter/client_test.go @@ -1608,9 +1608,9 @@ func Test_pushLogData_ShouldAddResponseTo400Error(t *testing.T) { // Sending logs using the client. err := splunkClient.pushLogData(context.Background(), logs) require.True(t, consumererror.IsPermanent(err), "Expecting permanent error") - require.Contains(t, err.Error(), "HTTP/0.0 400") + require.ErrorContains(t, err, "HTTP/0.0 400") // The returned error should contain the response body responseBody. - assert.Contains(t, err.Error(), responseBody) + assert.ErrorContains(t, err, responseBody) // An HTTP client that returns some other status code other than 400 and response body responseBody. httpClient, _ = newTestClient(500, responseBody) @@ -1618,7 +1618,7 @@ func Test_pushLogData_ShouldAddResponseTo400Error(t *testing.T) { // Sending logs using the client. err = splunkClient.pushLogData(context.Background(), logs) require.False(t, consumererror.IsPermanent(err), "Expecting non-permanent error") - require.Contains(t, err.Error(), "HTTP 500") + require.ErrorContains(t, err, "HTTP 500") // The returned error should not contain the response body responseBody. assert.NotContains(t, err.Error(), responseBody) } @@ -1953,7 +1953,7 @@ func Test_pushLogData_Small_MaxContentLength(t *testing.T) { require.Error(t, err) assert.True(t, consumererror.IsPermanent(err)) - assert.Contains(t, err.Error(), "dropped log event") + assert.ErrorContains(t, err, "dropped log event") } } diff --git a/exporter/sumologicexporter/go.mod b/exporter/sumologicexporter/go.mod index 5855b9b10f43..e5b7414ffac7 100644 --- a/exporter/sumologicexporter/go.mod +++ b/exporter/sumologicexporter/go.mod @@ -31,6 +31,7 @@ require ( github.com/Showmax/go-fqdn v1.0.0 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/ebitengine/purego v0.8.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/logr v1.4.2 // indirect @@ -54,8 +55,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/rs/cors v1.11.1 // indirect - github.com/shirou/gopsutil/v4 v4.24.8 // indirect - github.com/shoenig/go-m1cpu v0.1.6 // indirect + github.com/shirou/gopsutil/v4 v4.24.9 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect @@ -81,7 +81,7 @@ require ( golang.org/x/sys v0.25.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.0 // indirect + google.golang.org/grpc v1.67.1 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/exporter/sumologicexporter/go.sum b/exporter/sumologicexporter/go.sum index 983696596385..a04bb57c2d7a 100644 --- a/exporter/sumologicexporter/go.sum +++ b/exporter/sumologicexporter/go.sum @@ -5,6 +5,8 @@ github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyY 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/ebitengine/purego v0.8.0 h1:JbqvnEzRvPpxhCJzJJ2y0RbiZ8nyjccVUrSM3q+GvvE= +github.com/ebitengine/purego v0.8.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= @@ -67,12 +69,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/shirou/gopsutil/v4 v4.24.8 h1:pVQjIenQkIhqO81mwTaXjTzOMT7d3TZkf43PlVFHENI= -github.com/shirou/gopsutil/v4 v4.24.8/go.mod h1:wE0OrJtj4dG+hYkxqDH3QiBICdKSf04/npcvLLc/oRg= -github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= -github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= -github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= -github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= +github.com/shirou/gopsutil/v4 v4.24.9 h1:KIV+/HaHD5ka5f570RZq+2SaeFsb/pq+fp2DGNWYoOI= +github.com/shirou/gopsutil/v4 v4.24.9/go.mod h1:3fkaHNeYsUFCGZ8+9vZVWtbyM1k2eRnlL+bWO8Bxa/Q= 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= @@ -198,8 +196,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/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.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/exporter/tencentcloudlogserviceexporter/go.mod b/exporter/tencentcloudlogserviceexporter/go.mod index 645c5b122fc9..54a0ccf9360c 100644 --- a/exporter/tencentcloudlogserviceexporter/go.mod +++ b/exporter/tencentcloudlogserviceexporter/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.110.0 github.com/pierrec/lz4 v2.6.1+incompatible github.com/stretchr/testify v1.9.0 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1009 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1015 go.opentelemetry.io/collector/component v0.110.0 go.opentelemetry.io/collector/config/configopaque v1.16.0 go.opentelemetry.io/collector/confmap v1.16.0 diff --git a/exporter/tencentcloudlogserviceexporter/go.sum b/exporter/tencentcloudlogserviceexporter/go.sum index 675edbcb0f4d..0977e6df0a6c 100644 --- a/exporter/tencentcloudlogserviceexporter/go.sum +++ b/exporter/tencentcloudlogserviceexporter/go.sum @@ -56,8 +56,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1009 h1:nlftpuG6a8AOnvzYikn1i4vsZLgL20RMXphyVVS5GTQ= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1009/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1015 h1:O60uxxfWztVPVUBQjlJaop2Dw/J7CXGK9fSErMdWw+Y= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1015/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.opentelemetry.io/collector/component v0.110.0 h1:z7uSY/1dcK+vTY2z3v0XxeCoi2wqgHTow/ds3Gozuz4= diff --git a/extension/asapauthextension/go.mod b/extension/asapauthextension/go.mod index b9429bb3f046..28038092e3dd 100644 --- a/extension/asapauthextension/go.mod +++ b/extension/asapauthextension/go.mod @@ -12,7 +12,7 @@ require ( go.opentelemetry.io/collector/extension v0.110.0 go.opentelemetry.io/collector/extension/auth v0.110.0 go.uber.org/multierr v1.11.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 ) require ( diff --git a/extension/asapauthextension/go.sum b/extension/asapauthextension/go.sum index f8100a8db95f..b573e66f02e3 100644 --- a/extension/asapauthextension/go.sum +++ b/extension/asapauthextension/go.sum @@ -120,8 +120,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/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.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/extension/basicauthextension/go.mod b/extension/basicauthextension/go.mod index 78fd47dccdc1..b612068818ca 100644 --- a/extension/basicauthextension/go.mod +++ b/extension/basicauthextension/go.mod @@ -12,7 +12,7 @@ require ( go.opentelemetry.io/collector/extension v0.110.0 go.opentelemetry.io/collector/extension/auth v0.110.0 go.uber.org/goleak v1.3.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 ) require ( diff --git a/extension/basicauthextension/go.sum b/extension/basicauthextension/go.sum index 832fe3397b46..f9592ef8b138 100644 --- a/extension/basicauthextension/go.sum +++ b/extension/basicauthextension/go.sum @@ -120,8 +120,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/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.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/extension/bearertokenauthextension/go.mod b/extension/bearertokenauthextension/go.mod index ea854c040170..dac414e3c8ef 100644 --- a/extension/bearertokenauthextension/go.mod +++ b/extension/bearertokenauthextension/go.mod @@ -12,7 +12,7 @@ require ( go.opentelemetry.io/collector/extension/auth v0.110.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 ) require ( diff --git a/extension/bearertokenauthextension/go.sum b/extension/bearertokenauthextension/go.sum index f866b533b33e..5012ed820349 100644 --- a/extension/bearertokenauthextension/go.sum +++ b/extension/bearertokenauthextension/go.sum @@ -106,8 +106,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/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.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/extension/headerssetterextension/go.mod b/extension/headerssetterextension/go.mod index 521e2c4347cb..bfb5ebc2e885 100644 --- a/extension/headerssetterextension/go.mod +++ b/extension/headerssetterextension/go.mod @@ -11,7 +11,7 @@ require ( go.opentelemetry.io/collector/extension/auth v0.110.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 ) require ( diff --git a/extension/headerssetterextension/go.sum b/extension/headerssetterextension/go.sum index 6d41bcaa5b9f..27195e84b0d6 100644 --- a/extension/headerssetterextension/go.sum +++ b/extension/headerssetterextension/go.sum @@ -112,8 +112,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/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.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/extension/healthcheckv2extension/go.mod b/extension/healthcheckv2extension/go.mod index 1a60383da301..7d764c9c13cb 100644 --- a/extension/healthcheckv2extension/go.mod +++ b/extension/healthcheckv2extension/go.mod @@ -18,7 +18,7 @@ require ( go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 ) require ( diff --git a/extension/healthcheckv2extension/go.sum b/extension/healthcheckv2extension/go.sum index 4759a1b0333b..c82fa3f99304 100644 --- a/extension/healthcheckv2extension/go.sum +++ b/extension/healthcheckv2extension/go.sum @@ -156,8 +156,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/extension/jaegerremotesampling/go.mod b/extension/jaegerremotesampling/go.mod index c45979a5650d..219e3683fee5 100644 --- a/extension/jaegerremotesampling/go.mod +++ b/extension/jaegerremotesampling/go.mod @@ -20,7 +20,7 @@ require ( go.opentelemetry.io/collector/featuregate v1.16.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 ) require ( diff --git a/extension/jaegerremotesampling/go.sum b/extension/jaegerremotesampling/go.sum index 377bd4e2cc49..4034776d0253 100644 --- a/extension/jaegerremotesampling/go.sum +++ b/extension/jaegerremotesampling/go.sum @@ -209,8 +209,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/extension/oauth2clientauthextension/extension_test.go b/extension/oauth2clientauthextension/extension_test.go index c22561fb5c0e..efc49b09452a 100644 --- a/extension/oauth2clientauthextension/extension_test.go +++ b/extension/oauth2clientauthextension/extension_test.go @@ -82,8 +82,7 @@ func TestOAuthClientSettings(t *testing.T) { t.Run(test.name, func(t *testing.T) { rc, err := newClientAuthenticator(test.settings, zap.NewNop()) if test.shouldError { - assert.Error(t, err) - assert.Contains(t, err.Error(), test.expectedError) + assert.ErrorContains(t, err, test.expectedError) return } assert.NoError(t, err) @@ -296,7 +295,7 @@ func TestFailContactingOAuth(t *testing.T) { _, err = credential.GetRequestMetadata(context.Background()) assert.ErrorIs(t, err, errFailedToGetSecurityToken) - assert.Contains(t, err.Error(), serverURL.String()) + assert.ErrorContains(t, err, serverURL.String()) transport := http.DefaultTransport.(*http.Transport).Clone() baseRoundTripper := (http.RoundTripper)(transport) @@ -311,5 +310,5 @@ func TestFailContactingOAuth(t *testing.T) { require.NoError(t, err) _, err = client.Do(req) assert.ErrorIs(t, err, errFailedToGetSecurityToken) - assert.Contains(t, err.Error(), serverURL.String()) + assert.ErrorContains(t, err, serverURL.String()) } diff --git a/extension/oauth2clientauthextension/go.mod b/extension/oauth2clientauthextension/go.mod index e03e0cf96172..85ec64b26c00 100644 --- a/extension/oauth2clientauthextension/go.mod +++ b/extension/oauth2clientauthextension/go.mod @@ -14,7 +14,7 @@ require ( go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 golang.org/x/oauth2 v0.23.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 ) require ( diff --git a/extension/oauth2clientauthextension/go.sum b/extension/oauth2clientauthextension/go.sum index a59b70e723f0..5bc89346d64c 100644 --- a/extension/oauth2clientauthextension/go.sum +++ b/extension/oauth2clientauthextension/go.sum @@ -112,8 +112,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/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.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/extension/observer/dockerobserver/config_test.go b/extension/observer/dockerobserver/config_test.go index 98c806cef97b..a00c82925634 100644 --- a/extension/observer/dockerobserver/config_test.go +++ b/extension/observer/dockerobserver/config_test.go @@ -99,8 +99,7 @@ func TestApiVersionCustomError(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() err := sub.Unmarshal(cfg) - require.Error(t, err) - assert.Contains(t, err.Error(), + assert.ErrorContains(t, err, `Hint: You may want to wrap the 'api_version' value in quotes (api_version: "1.40")`, ) diff --git a/extension/observer/ecsobserver/task_test.go b/extension/observer/ecsobserver/task_test.go index 2daea1bdb2a6..2085912b8655 100644 --- a/extension/observer/ecsobserver/task_test.go +++ b/extension/observer/ecsobserver/task_test.go @@ -90,7 +90,7 @@ func TestTask_PrivateIP(t *testing.T) { assert.Equal(t, mode, errPINF.NetworkMode) // doing contains on error message is not good, but this line increase test coverage from 93% to 98% // not sure how the average coverage is calculated ... - assert.Contains(t, err.Error(), mode) + assert.ErrorContains(t, err, mode) } }) } @@ -185,7 +185,7 @@ func TestTask_MappedPort(t *testing.T) { errMPNF := &errMappedPortNotFound{} require.ErrorAs(t, err, &errMPNF) assert.Equal(t, mode, errMPNF.NetworkMode) - assert.Contains(t, err.Error(), mode) // for coverage + assert.ErrorContains(t, err, mode) // for coverage } }) } diff --git a/extension/observer/hostobserver/go.mod b/extension/observer/hostobserver/go.mod index f3c8f9506b61..d8736451f079 100644 --- a/extension/observer/hostobserver/go.mod +++ b/extension/observer/hostobserver/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.110.0 - github.com/shirou/gopsutil/v4 v4.24.8 + github.com/shirou/gopsutil/v4 v4.24.9 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.110.0 go.opentelemetry.io/collector/confmap v1.16.0 @@ -15,6 +15,7 @@ require ( require ( github.com/davecgh/go-spew v1.1.1 // indirect + github.com/ebitengine/purego v0.8.0 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect @@ -29,7 +30,6 @@ require ( github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect diff --git a/extension/observer/hostobserver/go.sum b/extension/observer/hostobserver/go.sum index 01107e22d81d..c84486a93224 100644 --- a/extension/observer/hostobserver/go.sum +++ b/extension/observer/hostobserver/go.sum @@ -1,5 +1,7 @@ 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/ebitengine/purego v0.8.0 h1:JbqvnEzRvPpxhCJzJJ2y0RbiZ8nyjccVUrSM3q+GvvE= +github.com/ebitengine/purego v0.8.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= 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= @@ -40,12 +42,8 @@ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= 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/shirou/gopsutil/v4 v4.24.8 h1:pVQjIenQkIhqO81mwTaXjTzOMT7d3TZkf43PlVFHENI= -github.com/shirou/gopsutil/v4 v4.24.8/go.mod h1:wE0OrJtj4dG+hYkxqDH3QiBICdKSf04/npcvLLc/oRg= -github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= -github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= -github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= -github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= +github.com/shirou/gopsutil/v4 v4.24.9 h1:KIV+/HaHD5ka5f570RZq+2SaeFsb/pq+fp2DGNWYoOI= +github.com/shirou/gopsutil/v4 v4.24.9/go.mod h1:3fkaHNeYsUFCGZ8+9vZVWtbyM1k2eRnlL+bWO8Bxa/Q= 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= diff --git a/extension/opampextension/go.mod b/extension/opampextension/go.mod index 681bf8af6dd2..300396a6f3d5 100644 --- a/extension/opampextension/go.mod +++ b/extension/opampextension/go.mod @@ -7,7 +7,7 @@ require ( github.com/oklog/ulid/v2 v2.1.0 github.com/open-telemetry/opamp-go v0.15.0 github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampcustommessages v0.110.0 - github.com/shirou/gopsutil/v4 v4.24.8 + github.com/shirou/gopsutil/v4 v4.24.9 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.110.0 go.opentelemetry.io/collector/component/componentstatus v0.110.0 @@ -25,6 +25,7 @@ require ( require ( github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/ebitengine/purego v0.8.0 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -41,7 +42,6 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect - github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/tklauser/go-sysconf v0.3.14 // indirect github.com/tklauser/numcpus v0.8.0 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect diff --git a/extension/opampextension/go.sum b/extension/opampextension/go.sum index d4fe448ec6f8..330e18b4a651 100644 --- a/extension/opampextension/go.sum +++ b/extension/opampextension/go.sum @@ -2,6 +2,8 @@ github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK3 github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/ebitengine/purego v0.8.0 h1:JbqvnEzRvPpxhCJzJJ2y0RbiZ8nyjccVUrSM3q+GvvE= +github.com/ebitengine/purego v0.8.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -51,12 +53,8 @@ github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA= -github.com/shirou/gopsutil/v4 v4.24.8 h1:pVQjIenQkIhqO81mwTaXjTzOMT7d3TZkf43PlVFHENI= -github.com/shirou/gopsutil/v4 v4.24.8/go.mod h1:wE0OrJtj4dG+hYkxqDH3QiBICdKSf04/npcvLLc/oRg= -github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= -github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= -github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= -github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= +github.com/shirou/gopsutil/v4 v4.24.9 h1:KIV+/HaHD5ka5f570RZq+2SaeFsb/pq+fp2DGNWYoOI= +github.com/shirou/gopsutil/v4 v4.24.9/go.mod h1:3fkaHNeYsUFCGZ8+9vZVWtbyM1k2eRnlL+bWO8Bxa/Q= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tklauser/go-sysconf v0.3.14 h1:g5vzr9iPFFz24v2KZXs/pvpvh8/V9Fw6vQK5ZZb78yU= diff --git a/extension/sigv4authextension/go.mod b/extension/sigv4authextension/go.mod index 0308038a4173..133ce7683870 100644 --- a/extension/sigv4authextension/go.mod +++ b/extension/sigv4authextension/go.mod @@ -3,10 +3,10 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4 go 1.22.0 require ( - github.com/aws/aws-sdk-go-v2 v1.30.5 - github.com/aws/aws-sdk-go-v2/config v1.27.35 - github.com/aws/aws-sdk-go-v2/credentials v1.17.33 - github.com/aws/aws-sdk-go-v2/service/sts v1.30.8 + github.com/aws/aws-sdk-go-v2 v1.31.0 + github.com/aws/aws-sdk-go-v2/config v1.27.39 + github.com/aws/aws-sdk-go-v2/credentials v1.17.37 + github.com/aws/aws-sdk-go-v2/service/sts v1.31.3 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.110.0 go.opentelemetry.io/collector/confmap v1.16.0 @@ -14,19 +14,19 @@ require ( go.opentelemetry.io/collector/extension/auth v0.110.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 ) require ( - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.22.8 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.8 // indirect - github.com/aws/smithy-go v1.20.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.23.3 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3 // indirect + github.com/aws/smithy-go v1.21.0 // indirect 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 diff --git a/extension/sigv4authextension/go.sum b/extension/sigv4authextension/go.sum index 521011a3f35f..87d6b2256fd1 100644 --- a/extension/sigv4authextension/go.sum +++ b/extension/sigv4authextension/go.sum @@ -1,29 +1,29 @@ -github.com/aws/aws-sdk-go-v2 v1.30.5 h1:mWSRTwQAb0aLE17dSzztCVJWI9+cRMgqebndjwDyK0g= -github.com/aws/aws-sdk-go-v2 v1.30.5/go.mod h1:CT+ZPWXbYrci8chcARI3OmI/qgd+f6WtuLOoaIA8PR0= -github.com/aws/aws-sdk-go-v2/config v1.27.35 h1:jeFgiWYNV0vrgdZqB4kZBjYNdy0IKkwrAjr2fwpHIig= -github.com/aws/aws-sdk-go-v2/config v1.27.35/go.mod h1:qnpEvTq8ZfjrCqmJGRfWZuF+lGZ/vG8LK2K0L/TY1gQ= -github.com/aws/aws-sdk-go-v2/credentials v1.17.33 h1:lBHAQQznENv0gLHAZ73ONiTSkCtr8q3pSqWrpbBBZz0= -github.com/aws/aws-sdk-go-v2/credentials v1.17.33/go.mod h1:MBuqCUOT3ChfLuxNDGyra67eskx7ge9e3YKYBce7wpI= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13 h1:pfQ2sqNpMVK6xz2RbqLEL0GH87JOwSxPV2rzm8Zsb74= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13/go.mod h1:NG7RXPUlqfsCLLFfi0+IpKN4sCB9D9fw/qTaSB+xRoU= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17 h1:pI7Bzt0BJtYA0N/JEC6B8fJ4RBrEMi1LBrkMdFYNSnQ= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17/go.mod h1:Dh5zzJYMtxfIjYW+/evjQ8uj2OyR/ve2KROHGHlSFqE= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17 h1:Mqr/V5gvrhA2gvgnF42Zh5iMiQNcOYthFYwCyrnuWlc= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17/go.mod h1:aLJpZlCmjE+V+KtN1q1uyZkfnUWpQGpbsn89XPKyzfU= +github.com/aws/aws-sdk-go-v2 v1.31.0 h1:3V05LbxTSItI5kUqNwhJrrrY1BAXxXt0sN0l72QmG5U= +github.com/aws/aws-sdk-go-v2 v1.31.0/go.mod h1:ztolYtaEUtdpf9Wftr31CJfLVjOnD/CVRkKOOYgF8hA= +github.com/aws/aws-sdk-go-v2/config v1.27.39 h1:FCylu78eTGzW1ynHcongXK9YHtoXD5AiiUqq3YfJYjU= +github.com/aws/aws-sdk-go-v2/config v1.27.39/go.mod h1:wczj2hbyskP4LjMKBEZwPRO1shXY+GsQleab+ZXT2ik= +github.com/aws/aws-sdk-go-v2/credentials v1.17.37 h1:G2aOH01yW8X373JK419THj5QVqu9vKEwxSEsGxihoW0= +github.com/aws/aws-sdk-go-v2/credentials v1.17.37/go.mod h1:0ecCjlb7htYCptRD45lXJ6aJDQac6D2NlKGpZqyTG6A= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 h1:C/d03NAmh8C4BZXhuRNboF/DqhBkBCeDiJDcaqIT5pA= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14/go.mod h1:7I0Ju7p9mCIdlrfS+JCgqcYD0VXz/N4yozsox+0o078= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 h1:kYQ3H1u0ANr9KEKlGs/jTLrBFPo8P8NaH/w7A01NeeM= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18/go.mod h1:r506HmK5JDUh9+Mw4CfGJGSSoqIiLCndAuqXuhbv67Y= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 h1:Z7IdFUONvTcvS7YuhtVxN99v2cCoHRXOS4mTr0B/pUc= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18/go.mod h1:DkKMmksZVVyat+Y+r1dEOgJEfUeA7UngIHWeKsi0yNc= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4 h1:KypMCbLPPHEmf9DgMGw51jMj77VfGPAN2Kv4cfhlfgI= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4/go.mod h1:Vz1JQXliGcQktFTN/LN6uGppAIRoLBR2bMvIMP0gOjc= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19 h1:rfprUlsdzgl7ZL2KlXiUAoJnI/VxfHCvDFr2QDFj6u4= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19/go.mod h1:SCWkEdRq8/7EK60NcvvQ6NXKuTcchAD4ROAsC37VEZE= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.8 h1:JRwuL+S1Qe1owZQoxblV7ORgRf2o0SrtzDVIbaVCdQ0= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.8/go.mod h1:eEygMHnTKH/3kNp9Jr1n3PdejuSNcgwLe1dWgQtO0VQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.8 h1:+HpGETD9463PFSj7lX5+eq7aLDs85QUIA+NBkeAsscA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.8/go.mod h1:bCbAxKDqNvkHxRaIMnyVPXPo+OaPRwvmgzMxbz1VKSA= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.8 h1:bAi+4p5EKnni+jrfcAhb7iHFQ24bthOAV9t0taf3DCE= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.8/go.mod h1:NXi1dIAGteSaRLqYgarlhP/Ij0cFT+qmCwiJqWh/U5o= -github.com/aws/smithy-go v1.20.4 h1:2HK1zBdPgRbjFOHlfeQZfpC4r72MOb9bZkiFwggKO+4= -github.com/aws/smithy-go v1.20.4/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 h1:QFASJGfT8wMXtuP3D5CRmMjARHv9ZmzFUMJznHDOY3w= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5/go.mod h1:QdZ3OmoIjSX+8D1OPAzPxDfjXASbBMDsz9qvtyIhtik= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 h1:Xbwbmk44URTiHNx6PNo0ujDE6ERlsCKJD3u1zfnzAPg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20/go.mod h1:oAfOFzUB14ltPZj1rWwRc3d/6OgD76R8KlvU3EqM9Fg= +github.com/aws/aws-sdk-go-v2/service/sso v1.23.3 h1:rs4JCczF805+FDv2tRhZ1NU0RB2H6ryAvsWPanAr72Y= +github.com/aws/aws-sdk-go-v2/service/sso v1.23.3/go.mod h1:XRlMvmad0ZNL+75C5FYdMvbbLkd6qiqz6foR1nA1PXY= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3 h1:S7EPdMVZod8BGKQQPTBK+FcX9g7bKR7c4+HxWqHP7Vg= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3/go.mod h1:FnvDM4sfa+isJ3kDXIzAB9GAwVSzFzSy97uZ3IsHo4E= +github.com/aws/aws-sdk-go-v2/service/sts v1.31.3 h1:VzudTFrDCIDakXtemR7l6Qzt2+JYsVqo2MxBPt5k8T8= +github.com/aws/aws-sdk-go-v2/service/sts v1.31.3/go.mod h1:yMWe0F+XG0DkRZK5ODZhG7BEFYhLXi2dqGsv6tX0cgI= +github.com/aws/smithy-go v1.21.0 h1:H7L8dtDRk0P1Qm6y0ji7MCYMQObJ5R9CRpyPhRUkLYA= +github.com/aws/smithy-go v1.21.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= 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= @@ -128,8 +128,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/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.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/extension/solarwindsapmsettingsextension/go.mod b/extension/solarwindsapmsettingsextension/go.mod index ca6c231a0e74..51fe0887aed1 100644 --- a/extension/solarwindsapmsettingsextension/go.mod +++ b/extension/solarwindsapmsettingsextension/go.mod @@ -12,7 +12,7 @@ require ( go.opentelemetry.io/collector/extension v0.110.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 ) require ( diff --git a/extension/solarwindsapmsettingsextension/go.sum b/extension/solarwindsapmsettingsextension/go.sum index dba0dfd07875..d98bda6c2fd0 100644 --- a/extension/solarwindsapmsettingsextension/go.sum +++ b/extension/solarwindsapmsettingsextension/go.sum @@ -144,8 +144,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/extension/sumologicextension/go.mod b/extension/sumologicextension/go.mod index 246736bef216..731e96cb69c4 100644 --- a/extension/sumologicextension/go.mod +++ b/extension/sumologicextension/go.mod @@ -6,7 +6,7 @@ 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.8 + github.com/shirou/gopsutil/v4 v4.24.9 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.110.0 go.opentelemetry.io/collector/config/confighttp v0.110.0 @@ -16,11 +16,12 @@ require ( go.opentelemetry.io/collector/featuregate v1.16.0 go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 ) require ( github.com/davecgh/go-spew v1.1.1 // indirect + github.com/ebitengine/purego v0.8.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/logr v1.4.2 // indirect @@ -35,7 +36,6 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/rs/cors v1.11.1 // indirect - github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect diff --git a/extension/sumologicextension/go.sum b/extension/sumologicextension/go.sum index 30c037cfbaba..1a174c0134f3 100644 --- a/extension/sumologicextension/go.sum +++ b/extension/sumologicextension/go.sum @@ -4,6 +4,8 @@ github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK3 github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/ebitengine/purego v0.8.0 h1:JbqvnEzRvPpxhCJzJJ2y0RbiZ8nyjccVUrSM3q+GvvE= +github.com/ebitengine/purego v0.8.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= @@ -52,12 +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/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.8 h1:pVQjIenQkIhqO81mwTaXjTzOMT7d3TZkf43PlVFHENI= -github.com/shirou/gopsutil/v4 v4.24.8/go.mod h1:wE0OrJtj4dG+hYkxqDH3QiBICdKSf04/npcvLLc/oRg= -github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= -github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= -github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= -github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= +github.com/shirou/gopsutil/v4 v4.24.9 h1:KIV+/HaHD5ka5f570RZq+2SaeFsb/pq+fp2DGNWYoOI= +github.com/shirou/gopsutil/v4 v4.24.9/go.mod h1:3fkaHNeYsUFCGZ8+9vZVWtbyM1k2eRnlL+bWO8Bxa/Q= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -155,8 +153,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/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.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/go.mod b/go.mod index da5fa57aaabb..60d9cf1452c2 100644 --- a/go.mod +++ b/go.mod @@ -16,9 +16,6 @@ go 1.22.0 // see https://github.com/google/gnostic/issues/262 replace github.com/googleapis/gnostic v0.5.6 => github.com/googleapis/gnostic v0.5.5 -// see https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/12322#issuecomment-1185029670 -replace github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 => github.com/docker/go-connections v0.4.0 - retract ( v0.76.2 v0.76.1 @@ -37,6 +34,3 @@ replace github.com/mattn/go-ieproxy => github.com/mattn/go-ieproxy v0.0.1 // openshift removed all tags from their repo, use the pseudoversion from the release-3.9 branch HEAD replace github.com/openshift/api v3.9.0+incompatible => github.com/openshift/api v0.0.0-20180801171038-322a19404e37 - -// It appears that the v0.2.0 tag was modified. Replacing with v0.2.1 -replace github.com/outcaste-io/ristretto v0.2.0 => github.com/outcaste-io/ristretto v0.2.1 diff --git a/internal/aws/proxy/conn_test.go b/internal/aws/proxy/conn_test.go index 77b3ddc8d0c8..97584a897205 100644 --- a/internal/aws/proxy/conn_test.go +++ b/internal/aws/proxy/conn_test.go @@ -255,8 +255,7 @@ func TestLoadEnvConfigCreds(t *testing.T) { assert.Equal(t, cases.Val, value, "Expect the credentials value to match") _, err = newAWSSession("ROLEARN", "TEST", zap.NewNop()) - assert.Error(t, err, "expected error") - assert.Contains(t, err.Error(), "unable to handle AWS error", "expected error message") + assert.ErrorContains(t, err, "unable to handle AWS error", "expected error message") } func TestGetProxyUrlProxyAddressNotValid(t *testing.T) { @@ -339,8 +338,7 @@ func TestProxyServerTransportInvalidProxyAddr(t *testing.T) { _, err := proxyServerTransport(&Config{ ProxyAddress: "invalid\n", }) - assert.Error(t, err, "expected error") - assert.Contains(t, err.Error(), "invalid control character in URL") + assert.ErrorContains(t, err, "invalid control character in URL") } func TestProxyServerTransportHappyCase(t *testing.T) { diff --git a/internal/aws/proxy/server_test.go b/internal/aws/proxy/server_test.go index 664684bb33f5..d65902f1ba31 100644 --- a/internal/aws/proxy/server_test.go +++ b/internal/aws/proxy/server_test.go @@ -207,7 +207,7 @@ func TestCantGetServiceEndpoint(t *testing.T) { _, err := NewServer(cfg, logger) assert.Error(t, err, "NewServer should fail") - assert.Contains(t, err.Error(), "invalid region") + assert.ErrorContains(t, err, "invalid region") } func TestAWSEndpointInvalid(t *testing.T) { @@ -222,7 +222,7 @@ func TestAWSEndpointInvalid(t *testing.T) { _, err := NewServer(cfg, logger) assert.Error(t, err, "NewServer should fail") - assert.Contains(t, err.Error(), "unable to parse AWS service endpoint") + assert.ErrorContains(t, err, "unable to parse AWS service endpoint") } func TestCanCreateTransport(t *testing.T) { @@ -237,7 +237,7 @@ func TestCanCreateTransport(t *testing.T) { _, err := NewServer(cfg, logger) assert.Error(t, err, "NewServer should fail") - assert.Contains(t, err.Error(), "failed to parse proxy URL") + assert.ErrorContains(t, err, "failed to parse proxy URL") } func TestGetServiceEndpointInvalidAWSConfig(t *testing.T) { diff --git a/internal/coreinternal/consumerretry/logs_test.go b/internal/coreinternal/consumerretry/logs_test.go index c4e6321b638e..7193797b76e7 100644 --- a/internal/coreinternal/consumerretry/logs_test.go +++ b/internal/coreinternal/consumerretry/logs_test.go @@ -88,8 +88,7 @@ func TestConsumeLogs_ContextDeadline(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), 5*time.Millisecond) defer cancel() err := consumer.ConsumeLogs(ctx, testdata.GenerateLogsTwoLogRecordsSameResource()) - assert.Error(t, err) - assert.Contains(t, err.Error(), "context is cancelled or timed out retry later") + assert.ErrorContains(t, err, "context is cancelled or timed out retry later") } func TestConsumeLogs_PartialRetry(t *testing.T) { diff --git a/internal/coreinternal/timeutils/parser_test.go b/internal/coreinternal/timeutils/parser_test.go index f83133c18589..80d572ef2c70 100644 --- a/internal/coreinternal/timeutils/parser_test.go +++ b/internal/coreinternal/timeutils/parser_test.go @@ -13,8 +13,7 @@ import ( func TestParseGoTimeBadLocation(t *testing.T) { _, err := ParseGotime(time.RFC822, "02 Jan 06 15:04 BST", time.UTC) - require.Error(t, err) - require.Contains(t, err.Error(), "failed to load location BST") + require.ErrorContains(t, err, "failed to load location BST") } func Test_setTimestampYear(t *testing.T) { diff --git a/internal/docker/docker_test.go b/internal/docker/docker_test.go index 0166812fb1ab..5589bdcef49d 100644 --- a/internal/docker/docker_test.go +++ b/internal/docker/docker_test.go @@ -62,8 +62,7 @@ func TestWatchingTimeouts(t *testing.T) { shouldHaveTaken := time.Now().Add(100 * time.Millisecond).UnixNano() err = cli.LoadContainerList(context.Background()) - require.Error(t, err) - assert.Contains(t, err.Error(), expectedError) + assert.ErrorContains(t, err, expectedError) observed, logs := observer.New(zapcore.WarnLevel) cli, err = NewDockerClient(config, zap.New(observed)) assert.NotNil(t, cli) @@ -120,9 +119,8 @@ func TestFetchingTimeouts(t *testing.T) { ) assert.Nil(t, statsJSON) - require.Error(t, err) - assert.Contains(t, err.Error(), expectedError) + assert.ErrorContains(t, err, expectedError) assert.Len(t, logs.All(), 1) for _, l := range logs.All() { diff --git a/internal/kafka/authentication_test.go b/internal/kafka/authentication_test.go index 6571817d5495..1f797e3019b7 100644 --- a/internal/kafka/authentication_test.go +++ b/internal/kafka/authentication_test.go @@ -155,8 +155,7 @@ func TestAuthentication(t *testing.T) { config := &sarama.Config{} err := ConfigureAuthentication(test.auth, config) if test.err != "" { - require.Error(t, err) - assert.Contains(t, err.Error(), test.err) + assert.ErrorContains(t, err, test.err) } else { // equalizes SCRAMClientGeneratorFunc to do assertion with the same reference. config.Net.SASL.SCRAMClientGeneratorFunc = test.saramaConfig.Net.SASL.SCRAMClientGeneratorFunc diff --git a/internal/metadataproviders/go.mod b/internal/metadataproviders/go.mod index 3877cef10441..30617b347eb8 100644 --- a/internal/metadataproviders/go.mod +++ b/internal/metadataproviders/go.mod @@ -8,7 +8,7 @@ require ( github.com/docker/docker v26.1.5+incompatible github.com/hashicorp/consul/api v1.29.4 github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.110.0 - github.com/shirou/gopsutil/v4 v4.24.8 + github.com/shirou/gopsutil/v4 v4.24.9 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/semconv v0.110.0 go.opentelemetry.io/otel v1.30.0 @@ -27,6 +27,7 @@ require ( github.com/distribution/reference v0.5.0 // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect + github.com/ebitengine/purego v0.8.0 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/fatih/color v1.16.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect @@ -74,7 +75,6 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.2 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect diff --git a/internal/metadataproviders/go.sum b/internal/metadataproviders/go.sum index 848b86e4370d..bf8b52b535d6 100644 --- a/internal/metadataproviders/go.sum +++ b/internal/metadataproviders/go.sum @@ -84,6 +84,8 @@ github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5Xh 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/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/ebitengine/purego v0.8.0 h1:JbqvnEzRvPpxhCJzJJ2y0RbiZ8nyjccVUrSM3q+GvvE= +github.com/ebitengine/purego v0.8.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= @@ -391,12 +393,8 @@ github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99 github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shirou/gopsutil/v4 v4.24.8 h1:pVQjIenQkIhqO81mwTaXjTzOMT7d3TZkf43PlVFHENI= -github.com/shirou/gopsutil/v4 v4.24.8/go.mod h1:wE0OrJtj4dG+hYkxqDH3QiBICdKSf04/npcvLLc/oRg= -github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= -github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= -github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= -github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= +github.com/shirou/gopsutil/v4 v4.24.9 h1:KIV+/HaHD5ka5f570RZq+2SaeFsb/pq+fp2DGNWYoOI= +github.com/shirou/gopsutil/v4 v4.24.9/go.mod h1:3fkaHNeYsUFCGZ8+9vZVWtbyM1k2eRnlL+bWO8Bxa/Q= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= diff --git a/internal/otelarrow/go.mod b/internal/otelarrow/go.mod index 813d801e8350..12c1ca199b5d 100644 --- a/internal/otelarrow/go.mod +++ b/internal/otelarrow/go.mod @@ -7,7 +7,7 @@ require ( github.com/klauspost/compress v1.17.10 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/otelarrowexporter v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/otelarrowreceiver v0.110.0 - github.com/open-telemetry/otel-arrow v0.26.0 + github.com/open-telemetry/otel-arrow v0.27.0 github.com/stretchr/testify v1.9.0 github.com/wk8/go-ordered-map/v2 v2.1.8 go.opentelemetry.io/collector/component v0.110.0 @@ -26,7 +26,7 @@ require ( go.opentelemetry.io/otel/trace v1.30.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 ) require ( diff --git a/internal/otelarrow/go.sum b/internal/otelarrow/go.sum index 54479e1e5db6..42c59dea83fa 100644 --- a/internal/otelarrow/go.sum +++ b/internal/otelarrow/go.sum @@ -87,8 +87,8 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/mostynb/go-grpc-compression v1.2.3 h1:42/BKWMy0KEJGSdWvzqIyOZ95YcR9mLPqKctH7Uo//I= github.com/mostynb/go-grpc-compression v1.2.3/go.mod h1:AghIxF3P57umzqM9yz795+y1Vjs47Km/Y2FE6ouQ7Lg= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/open-telemetry/otel-arrow v0.26.0 h1:zizyFFtYfVzkjXGtY5iFSR5ognddzwJlD8fGPsVgCLo= -github.com/open-telemetry/otel-arrow v0.26.0/go.mod h1:QGueLcxK3nVjRnVCevyyeCEnI2YkFqgT/TWgw58eVy4= +github.com/open-telemetry/otel-arrow v0.27.0 h1:dxEaCM1epON+iauCNvju/uxeChLwz5u4ifAY3BdjWFU= +github.com/open-telemetry/otel-arrow v0.27.0/go.mod h1:QGueLcxK3nVjRnVCevyyeCEnI2YkFqgT/TWgw58eVy4= 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= @@ -253,8 +253,8 @@ gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6d gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/internal/sqlquery/row_scanner.go b/internal/sqlquery/row_scanner.go index bfda8aab270e..5366f808160c 100644 --- a/internal/sqlquery/row_scanner.go +++ b/internal/sqlquery/row_scanner.go @@ -32,7 +32,7 @@ func newRowScanner(colTypes []colType) *rowScanner { } format := "%v" if t, isTime := v.(time.Time); isTime { - return t.Format(time.RFC3339), nil + return t.Format(time.RFC3339Nano), nil } if reflect.TypeOf(v).Kind() == reflect.Slice { // The Postgres driver returns a []uint8 (ascii string) for decimal and numeric types, diff --git a/internal/tools/go.mod b/internal/tools/go.mod index db87f13f548e..0320f103babf 100644 --- a/internal/tools/go.mod +++ b/internal/tools/go.mod @@ -266,9 +266,6 @@ require ( // openshift removed all tags from their repo, use the pseudoversion from the release-3.9 branch HEAD replace github.com/openshift/api v3.9.0+incompatible => github.com/openshift/api v0.0.0-20180801171038-322a19404e37 -// It appears that the v0.2.0 tag was modified. Replacing with v0.2.1 -replace github.com/outcaste-io/ristretto v0.2.0 => github.com/outcaste-io/ristretto v0.2.1 - retract ( v0.76.2 v0.76.1 diff --git a/pkg/datadog/config/config.go b/pkg/datadog/config/config.go index 43001935ab63..60542c785993 100644 --- a/pkg/datadog/config/config.go +++ b/pkg/datadog/config/config.go @@ -147,7 +147,7 @@ func validateClientConfig(cfg confighttp.ClientConfig) error { if cfg.Compression != "" { unsupported = append(unsupported, "compression") } - if cfg.Headers != nil { + if len(cfg.Headers) > 0 { unsupported = append(unsupported, "headers") } if cfg.HTTP2ReadIdleTimeout != 0 { @@ -281,10 +281,9 @@ func (c *Config) Unmarshal(configMap *confmap.Conf) error { } func defaultClientConfig() confighttp.ClientConfig { - // do not use NewDefaultClientConfig for backwards-compatibility - return confighttp.ClientConfig{ - Timeout: 15 * time.Second, - } + client := confighttp.NewDefaultClientConfig() + client.Timeout = 15 * time.Second + return client } // CreateDefaultConfig creates the default exporter configuration diff --git a/pkg/ottl/e2e/e2e_test.go b/pkg/ottl/e2e/e2e_test.go index b908319382a4..ede1e329bdb1 100644 --- a/pkg/ottl/e2e/e2e_test.go +++ b/pkg/ottl/e2e/e2e_test.go @@ -420,6 +420,12 @@ func Test_e2e_converters(t *testing.T) { tCtx.GetLogRecord().Attributes().PutDouble("test", 1.5) }, }, + { + statement: `set(attributes["test"], InsertXML("", "/a", ""))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "") + }, + }, { statement: `set(attributes["test"], Int(1.0))`, want: func(tCtx ottllog.TransformContext) { @@ -615,6 +621,30 @@ func Test_e2e_converters(t *testing.T) { m.PutStr("k2", "v2__!__v2") }, }, + { + statement: `set(attributes["test"], ToKeyValueString(ParseKeyValue("k1=v1 k2=v2"), "=", " ", true))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "k1=v1 k2=v2") + }, + }, + { + statement: `set(attributes["test"], ToKeyValueString(ParseKeyValue("k1:v1,k2:v2", ":" , ","), ":", ",", true))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "k1:v1,k2:v2") + }, + }, + { + statement: `set(attributes["test"], ToKeyValueString(ParseKeyValue("k1=v1 k2=v2"), "!", "+", true))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "k1!v1+k2!v2") + }, + }, + { + statement: `set(attributes["test"], ToKeyValueString(ParseKeyValue("k1=v1 k2=v2=v3"), "=", " ", true))`, + want: func(tCtx ottllog.TransformContext) { + tCtx.GetLogRecord().Attributes().PutStr("test", "k1=v1 k2=\"v2=v3\"") + }, + }, { statement: `set(attributes["test"], ParseXML("This is a log message!"))`, want: func(tCtx ottllog.TransformContext) { @@ -1088,3 +1118,37 @@ func fillSpanOne(span ptrace.Span) { span.SetSpanID(spanID) span.SetTraceID(traceID) } + +func Benchmark_XML_Functions(b *testing.B) { + testXML := `12` + tCtxWithTestBody := func() ottllog.TransformContext { + resource := pcommon.NewResource() + scope := pcommon.NewInstrumentationScope() + logRecord := plog.NewLogRecord() + logRecord.Body().SetStr(testXML) + return ottllog.NewTransformContext(logRecord, scope, resource, plog.NewScopeLogs(), plog.NewResourceLogs()) + } + + settings := componenttest.NewNopTelemetrySettings() + logParser, err := ottllog.NewParser(ottlfuncs.StandardFuncs[ottllog.TransformContext](), settings) + assert.NoError(b, err) + + // Use a round trip composition to ensure each iteration of the benchmark is the same. + // GetXML(body, "/Data/From/Test") returns "12" + // InsertXML(body, "/Data/To", GetXML(...)) adds the two Test elements to the To element + // RemoveXML(InsertXML(...) "/Data/To/Test") removes the Test elements which were just added + // set overwrites the body, but the result should be the same as the original body + roundTrip := `set(body, RemoveXML(InsertXML(body, "/Data/To", GetXML(body, "/Data/From/Test")), "/Data/To/Test"))` + logStatements, err := logParser.ParseStatement(roundTrip) + assert.NoError(b, err) + + actualCtx := tCtxWithTestBody() + b.ReportAllocs() + b.ResetTimer() + for i := 0; i < b.N; i++ { + _, _, _ = logStatements.Execute(context.Background(), actualCtx) + } + + // Ensure correctness + assert.NoError(b, plogtest.CompareResourceLogs(newResourceLogs(tCtxWithTestBody()), newResourceLogs(actualCtx))) +} diff --git a/pkg/ottl/ottlfuncs/README.md b/pkg/ottl/ottlfuncs/README.md index a4f0281c4d2c..380cb41d8c50 100644 --- a/pkg/ottl/ottlfuncs/README.md +++ b/pkg/ottl/ottlfuncs/README.md @@ -414,6 +414,8 @@ Available Converters: - [Concat](#concat) - [ConvertCase](#convertcase) - [Day](#day) +- [Double](#double) +- [Duration](#duration) - [ExtractPatterns](#extractpatterns) - [ExtractGrokPatterns](#extractgrokpatterns) - [FNV](#fnv) @@ -422,8 +424,7 @@ Available Converters: - [Hex](#hex) - [Hour](#hour) - [Hours](#hours) -- [Double](#double) -- [Duration](#duration) +- [InsertXML](#insertxml) - [Int](#int) - [IsBool](#isbool) - [IsDouble](#isdouble) @@ -458,6 +459,7 @@ Available Converters: - [String](#string) - [Substring](#substring) - [Time](#time) +- [ToKeyValueString](#tokeyvaluestring) - [TraceID](#traceid) - [TruncateTime](#truncatetime) - [Unix](#unix) @@ -829,6 +831,35 @@ Examples: - `Hours(Duration("1h"))` +### InsertXML + +`InsertXML(target, xpath, value)` + +The `InsertXML` Converter returns an edited version of an XML string with child elements added to selected elements. + +`target` is a Getter that returns a string. This string should be in XML format and represents the document which will +be modified. If `target` is not a string, nil, or is not valid xml, `InsertXML` will return an error. + +`xpath` is a string that specifies an [XPath](https://www.w3.org/TR/1999/REC-xpath-19991116/) expression that +selects one or more elements. + +`value` is a Getter that returns a string. This string should be in XML format and represents the document which will +be inserted into `target`. If `value` is not a string, nil, or is not valid xml, `InsertXML` will return an error. + +Examples: + +Add an element "foo" to the root of the document + +- `InsertXML(body, "/", "")` + +Add an element "bar" to any element called "foo" + +- `InsertXML(body, "//foo", "")` + +Fetch and insert an xml document into another + +- `InsertXML(body, "/subdoc", attributes["subdoc"])` + ### Int `Int(value)` @@ -1630,6 +1661,44 @@ Examples: - `Time("mercoledì set 4 2024", "%A %h %e %Y", "", "it")` - `Time("Febrero 25 lunes, 2002, 02:03:04 p.m.", "%B %d %A, %Y, %r", "America/New_York", "es-ES")` +### ToKeyValueString + +`ToKeyValueString(target, Optional[delimiter], Optional[pair_delimiter], Optional[sort_output])` + +The `ToKeyValueString` Converter takes a `pcommon.Map` and converts it to a `string` of key value pairs. + +- `target` is a Getter that returns a `pcommon.Map`. +- `delimiter` is an optional string that is used to join keys and values, the default is `=`. +- `pair_delimiter` is an optional string that is used to join key value pairs, the default is a single space (` `). +- `sort_output` is an optional bool that is used to deterministically sort the keys of the output string. It should only be used if the output is required to be in the same order each time, as it introduces some performance overhead. + +For example, the following map `{"k1":"v1","k2":"v2","k3":"v3"}` will use default delimiters and be converted into the following string: + +``` +`k1=v1 k2=v2 k3=v3` +``` + +**Note:** Any nested arrays or maps will be represented as a JSON string. It is recommended to [flatten](#flatten) `target` before using this function. + +For example, `{"k1":"v1","k2":{"k3":"v3","k4":["v4","v5"]}}` will be converted to: + +``` +`k1=v1 k2={\"k3\":\"v3\",\"k4\":[\"v4\",\"v5\"]}` +``` + +**Note:** If any keys or values contain either delimiter, they will be double quoted. If any double quotes are present in the quoted value, they will be escaped. + +For example, `{"k1":"v1","k2":"v=2","k3"="\"v=3\""}` will be converted to: + +``` +`k1=v1 k2="v=2" k3="\"v=3\""` +``` + +Examples: + +- `ToKeyValueString(body)` +- `ToKeyValueString(body, ":", ",", true)` + ### TraceID `TraceID(bytes)` diff --git a/pkg/ottl/ottlfuncs/func_insert_xml.go b/pkg/ottl/ottlfuncs/func_insert_xml.go new file mode 100644 index 000000000000..778b16938a07 --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_insert_xml.go @@ -0,0 +1,75 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs" + +import ( + "context" + "errors" + "fmt" + + "github.com/antchfx/xmlquery" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +type InsertXMLArguments[K any] struct { + Target ottl.StringGetter[K] + XPath string + SubDocument ottl.StringGetter[K] +} + +func NewInsertXMLFactory[K any]() ottl.Factory[K] { + return ottl.NewFactory("InsertXML", &InsertXMLArguments[K]{}, createInsertXMLFunction[K]) +} + +func createInsertXMLFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { + args, ok := oArgs.(*InsertXMLArguments[K]) + + if !ok { + return nil, fmt.Errorf("InsertXML args must be of type *InsertXMLAguments[K]") + } + + if err := validateXPath(args.XPath); err != nil { + return nil, err + } + + return insertXML(args.Target, args.XPath, args.SubDocument), nil +} + +// insertXML returns a XML formatted string that is a result of inserting another XML document into +// the content of each selected target element. +func insertXML[K any](target ottl.StringGetter[K], xPath string, subGetter ottl.StringGetter[K]) ottl.ExprFunc[K] { + return func(ctx context.Context, tCtx K) (any, error) { + var doc *xmlquery.Node + if targetVal, err := target.Get(ctx, tCtx); err != nil { + return nil, err + } else if doc, err = parseNodesXML(targetVal); err != nil { + return nil, err + } + + var subDoc *xmlquery.Node + if subDocVal, err := subGetter.Get(ctx, tCtx); err != nil { + return nil, err + } else if subDoc, err = parseNodesXML(subDocVal); err != nil { + return nil, err + } + + nodes, errs := xmlquery.QueryAll(doc, xPath) + for _, n := range nodes { + switch n.Type { + case xmlquery.ElementNode, xmlquery.DocumentNode: + var nextSibling *xmlquery.Node + for c := subDoc.FirstChild; c != nil; c = nextSibling { + // AddChild updates c.NextSibling but not subDoc.FirstChild + // so we need to get the handle to it prior to the update. + nextSibling = c.NextSibling + xmlquery.AddChild(n, c) + } + default: + errs = errors.Join(errs, fmt.Errorf("InsertXML XPath selected non-element: %q", n.Data)) + } + } + return doc.OutputXML(false), errs + } +} diff --git a/pkg/ottl/ottlfuncs/func_insert_xml_test.go b/pkg/ottl/ottlfuncs/func_insert_xml_test.go new file mode 100644 index 000000000000..32750d4c8feb --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_insert_xml_test.go @@ -0,0 +1,185 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs" + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +func Test_InsertXML(t *testing.T) { + tests := []struct { + name string + document string + xPath string + subdoc string + want string + expectErr string + }{ + { + name: "add single element", + document: ``, + xPath: "/a", + subdoc: ``, + want: ``, + }, + { + name: "add single element to multiple matches", + document: ``, + xPath: "/a", + subdoc: ``, + want: ``, + }, + { + name: "add single element at multiple levels", + document: ``, + xPath: "//a", + subdoc: ``, + want: ``, + }, + { + name: "add multiple elements at root", + document: ``, + xPath: "/", + subdoc: ``, + want: ``, + }, + { + name: "add multiple elements to other element", + document: ``, + xPath: "/a", + subdoc: ``, + want: ``, + }, + { + name: "add multiple elements to multiple elements", + document: ``, + xPath: "/a", + subdoc: ``, + want: ``, + }, + { + name: "add multiple elements at multiple levels", + document: ``, + xPath: "//a", + subdoc: ``, + want: ``, + }, + { + name: "add rich doc", + document: ``, + xPath: "/a", + subdoc: `text1`, + want: `text1`, + }, + { + name: "add root element to empty document", + document: ``, + xPath: "/", + subdoc: ``, + want: ``, + }, + { + name: "add root element to non-empty document", + document: ``, + xPath: "/", + subdoc: ``, + want: ``, + }, + { + name: "err on attribute", + document: ``, + xPath: "/a/@foo", + subdoc: "", + want: ``, + expectErr: `InsertXML XPath selected non-element: "foo"`, + }, + { + name: "err on text content", + document: `foo`, + xPath: "/a/text()", + subdoc: "", + want: `foo`, + expectErr: `InsertXML XPath selected non-element: "foo"`, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + f := NewInsertXMLFactory[any]() + exprFunc, err := f.CreateFunction( + ottl.FunctionContext{}, + &InsertXMLArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return tt.document, nil + }, + }, + XPath: tt.xPath, + SubDocument: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return tt.subdoc, nil + }, + }, + }) + assert.NoError(t, err) + + result, err := exprFunc(context.Background(), nil) + if tt.expectErr == "" { + assert.NoError(t, err) + } else { + assert.EqualError(t, err, tt.expectErr) + } + assert.Equal(t, tt.want, result) + }) + } +} + +func TestCreateInsertXMLFunc(t *testing.T) { + factory := NewInsertXMLFactory[any]() + fCtx := ottl.FunctionContext{} + + // Invalid arg type + exprFunc, err := factory.CreateFunction(fCtx, nil) + assert.Error(t, err) + assert.Nil(t, exprFunc) + + // Invalid XPath should error on function creation + exprFunc, err = factory.CreateFunction( + fCtx, &InsertXMLArguments[any]{ + XPath: "!", + }) + assert.Error(t, err) + assert.Nil(t, exprFunc) + + // Invalid XML target should error on function execution + exprFunc, err = factory.CreateFunction( + fCtx, &InsertXMLArguments[any]{ + Target: invalidXMLGetter(), + XPath: "/", + }) + assert.NoError(t, err) + assert.NotNil(t, exprFunc) + _, err = exprFunc(context.Background(), nil) + assert.Error(t, err) + + // Invalid XML subdoc should error on function execution + exprFunc, err = factory.CreateFunction( + fCtx, &InsertXMLArguments[any]{ + Target: ottl.StandardStringGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "", nil + }, + }, + XPath: "/", + SubDocument: invalidXMLGetter(), + }) + assert.NoError(t, err) + assert.NotNil(t, exprFunc) + _, err = exprFunc(context.Background(), nil) + assert.Error(t, err) +} diff --git a/pkg/ottl/ottlfuncs/func_replace_all_patterns_test.go b/pkg/ottl/ottlfuncs/func_replace_all_patterns_test.go index 534bd80f2c07..2d2be602ca00 100644 --- a/pkg/ottl/ottlfuncs/func_replace_all_patterns_test.go +++ b/pkg/ottl/ottlfuncs/func_replace_all_patterns_test.go @@ -627,5 +627,5 @@ func Test_replaceAllPatterns_invalid_model(t *testing.T) { invalidMode := "invalid" exprFunc, err := replaceAllPatterns[any](target, invalidMode, "regex", replacement, function, replacementFormat) assert.Nil(t, exprFunc) - assert.Contains(t, err.Error(), "invalid mode") + assert.ErrorContains(t, err, "invalid mode") } diff --git a/pkg/ottl/ottlfuncs/func_to_key_value_string.go b/pkg/ottl/ottlfuncs/func_to_key_value_string.go new file mode 100644 index 000000000000..ece12a88e1bc --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_to_key_value_string.go @@ -0,0 +1,122 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl/ottlfuncs" + +import ( + "context" + "fmt" + gosort "sort" + "strings" + + "go.opentelemetry.io/collector/pdata/pcommon" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +type ToKeyValueStringArguments[K any] struct { + Target ottl.PMapGetter[K] + Delimiter ottl.Optional[string] + PairDelimiter ottl.Optional[string] + SortOutput ottl.Optional[bool] +} + +func NewToKeyValueStringFactory[K any]() ottl.Factory[K] { + return ottl.NewFactory("ToKeyValueString", &ToKeyValueStringArguments[K]{}, createToKeyValueStringFunction[K]) +} + +func createToKeyValueStringFunction[K any](_ ottl.FunctionContext, oArgs ottl.Arguments) (ottl.ExprFunc[K], error) { + args, ok := oArgs.(*ToKeyValueStringArguments[K]) + + if !ok { + return nil, fmt.Errorf("ToKeyValueStringFactory args must be of type *ToKeyValueStringArguments[K]") + } + + return toKeyValueString[K](args.Target, args.Delimiter, args.PairDelimiter, args.SortOutput) +} + +func toKeyValueString[K any](target ottl.PMapGetter[K], d ottl.Optional[string], p ottl.Optional[string], s ottl.Optional[bool]) (ottl.ExprFunc[K], error) { + delimiter := "=" + if !d.IsEmpty() { + if d.Get() == "" { + return nil, fmt.Errorf("delimiter cannot be set to an empty string") + } + delimiter = d.Get() + } + + pairDelimiter := " " + if !p.IsEmpty() { + if p.Get() == "" { + return nil, fmt.Errorf("pair delimiter cannot be set to an empty string") + } + pairDelimiter = p.Get() + } + + if pairDelimiter == delimiter { + return nil, fmt.Errorf("pair delimiter %q cannot be equal to delimiter %q", pairDelimiter, delimiter) + } + + sortOutput := false + if !s.IsEmpty() { + sortOutput = s.Get() + } + + return func(ctx context.Context, tCtx K) (any, error) { + source, err := target.Get(ctx, tCtx) + if err != nil { + return nil, err + } + + return convertMapToKV(source, delimiter, pairDelimiter, sortOutput), nil + }, nil +} + +// convertMapToKV converts a pcommon.Map to a key value string +func convertMapToKV(target pcommon.Map, delimiter string, pairDelimiter string, sortOutput bool) string { + + var kvStrings []string + if sortOutput { + var keyValues []struct { + key string + val pcommon.Value + } + + // Sort by keys + target.Range(func(k string, v pcommon.Value) bool { + keyValues = append(keyValues, struct { + key string + val pcommon.Value + }{key: k, val: v}) + return true + }) + gosort.Slice(keyValues, func(i, j int) bool { + return keyValues[i].key < keyValues[j].key + }) + + // Convert KV pairs + for _, kv := range keyValues { + kvStrings = append(kvStrings, buildKVString(kv.key, kv.val, delimiter, pairDelimiter)) + } + } else { + target.Range(func(k string, v pcommon.Value) bool { + kvStrings = append(kvStrings, buildKVString(k, v, delimiter, pairDelimiter)) + return true + }) + } + + return strings.Join(kvStrings, pairDelimiter) +} + +func buildKVString(k string, v pcommon.Value, delimiter string, pairDelimiter string) string { + key := escapeAndQuoteKV(k, delimiter, pairDelimiter) + value := escapeAndQuoteKV(v.AsString(), delimiter, pairDelimiter) + return key + delimiter + value +} + +func escapeAndQuoteKV(s string, delimiter string, pairDelimiter string) string { + s = strings.ReplaceAll(s, `"`, `\"`) + if strings.Contains(s, pairDelimiter) || strings.Contains(s, delimiter) { + s = `"` + s + `"` + } + return s +} diff --git a/pkg/ottl/ottlfuncs/func_to_key_value_string_test.go b/pkg/ottl/ottlfuncs/func_to_key_value_string_test.go new file mode 100644 index 000000000000..981c8c8ceb8d --- /dev/null +++ b/pkg/ottl/ottlfuncs/func_to_key_value_string_test.go @@ -0,0 +1,249 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottlfuncs + +import ( + "context" + "testing" + + "github.com/stretchr/testify/assert" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" +) + +func Test_toKeyValueString(t *testing.T) { + tests := []struct { + name string + target ottl.PMapGetter[any] + delimiter ottl.Optional[string] + pairDelimiter ottl.Optional[string] + expected string + }{ + { + name: "default delimiters with no nesting", + target: ottl.StandardPMapGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return map[string]any{ + "key1": "value1", + "key2": "value2", + }, nil + }, + }, + delimiter: ottl.Optional[string]{}, + pairDelimiter: ottl.Optional[string]{}, + expected: `key1=value1 key2=value2`, + }, + { + name: "custom delimiter with no nesting", + target: ottl.StandardPMapGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return map[string]any{ + "key1": "value1", + "key2": "value2", + }, nil + }, + }, + delimiter: ottl.NewTestingOptional[string](":"), + pairDelimiter: ottl.Optional[string]{}, + expected: `key1:value1 key2:value2`, + }, + { + name: "custom pair delimiter with no nesting", + target: ottl.StandardPMapGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return map[string]any{ + "key1": "value1", + "key2": "value2", + }, nil + }, + }, + delimiter: ottl.Optional[string]{}, + pairDelimiter: ottl.NewTestingOptional[string](","), + expected: `key1=value1,key2=value2`, + }, + { + name: "delimiters present in keys and values", + target: ottl.StandardPMapGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return map[string]any{ + "key 1": "value 1", + "key2=": "value2=", + }, nil + }, + }, + delimiter: ottl.Optional[string]{}, + pairDelimiter: ottl.Optional[string]{}, + expected: `"key 1"="value 1" "key2="="value2="`, + }, + { + name: "long delimiters present in keys and values", + target: ottl.StandardPMapGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return map[string]any{ + "key1": "value1", + "key2,,,": "value2,,,,,,", + }, nil + }, + }, + delimiter: ottl.NewTestingOptional[string](",,,"), + pairDelimiter: ottl.Optional[string]{}, + expected: `key1,,,value1 "key2,,,",,,"value2,,,,,,"`, + }, + { + name: "delimiters and quotes present in keys and values", + target: ottl.StandardPMapGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return map[string]any{ + "key 1": "value 1", + "key2\"=": "value2\"=", + "key\"3": "value\"3", + }, nil + }, + }, + delimiter: ottl.Optional[string]{}, + pairDelimiter: ottl.Optional[string]{}, + expected: `"key 1"="value 1" key\"3=value\"3 "key2\"="="value2\"="`, + }, + { + name: "nested", + target: ottl.StandardPMapGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return map[string]any{ + "key1": "value1", + "key2": map[string]any{ + "key3": "value3", + "key4": map[string]any{ + "key5": "value5", + "key6": []any{"value6a", "value6b"}, + }, + }, + "key7": []any{"value7", []any{"value8a", map[string]any{"key8b": "value8b"}}}, + }, nil + }, + }, + delimiter: ottl.Optional[string]{}, + pairDelimiter: ottl.Optional[string]{}, + expected: `key1=value1 key2={\"key3\":\"value3\",\"key4\":{\"key5\":\"value5\",\"key6\":[\"value6a\",\"value6b\"]}} key7=[\"value7\",[\"value8a\",{\"key8b\":\"value8b\"}]]`, + }, + { + name: "nested with delimiter present", + target: ottl.StandardPMapGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return map[string]any{ + "key1": "value1", + "key2": map[string]any{ + "key3": "value3", + "key4": map[string]any{ + "key5": "value=5", + "key6": []any{"value6a", "value6b"}, + }, + }, + "key7": []any{"value7", []any{"value8a", map[string]any{"key 8b": "value8b"}}}, + }, nil + }, + }, + delimiter: ottl.Optional[string]{}, + pairDelimiter: ottl.Optional[string]{}, + expected: `key1=value1 key2="{\"key3\":\"value3\",\"key4\":{\"key5\":\"value=5\",\"key6\":[\"value6a\",\"value6b\"]}}" key7="[\"value7\",[\"value8a\",{\"key 8b\":\"value8b\"}]]"`, + }, + { + name: "nested with delimiter and quotes present", + target: ottl.StandardPMapGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return map[string]any{ + "key1": "value1\"", + "key2": map[string]any{ + "key3": "value3", + "key4": map[string]any{ + "key5": "value=5\"", + "key6": []any{"value6a", "value6b"}, + }, + }, + "key7": []any{"value7", []any{"value8a", map[string]any{"key 8b\"": "value8b"}}}, + }, nil + }, + }, + delimiter: ottl.Optional[string]{}, + pairDelimiter: ottl.Optional[string]{}, + expected: `key1=value1\" key2="{\"key3\":\"value3\",\"key4\":{\"key5\":\"value=5\\"\",\"key6\":[\"value6a\",\"value6b\"]}}" key7="[\"value7\",[\"value8a\",{\"key 8b\\"\":\"value8b\"}]]"`, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + exprFunc, err := toKeyValueString[any](tt.target, tt.delimiter, tt.pairDelimiter, ottl.NewTestingOptional[bool](true)) + assert.NoError(t, err) + + result, err := exprFunc(context.Background(), nil) + assert.NoError(t, err) + + actual, ok := result.(string) + assert.True(t, ok) + + assert.Equal(t, tt.expected, actual) + }) + } +} + +func Test_toKeyValueString_equal_delimiters(t *testing.T) { + target := ottl.StandardPMapGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return map[string]any{ + "key1": "value1", + "key2": "value2", + }, nil + }, + } + delimiter := ottl.NewTestingOptional[string]("=") + pairDelimiter := ottl.NewTestingOptional[string]("=") + _, err := toKeyValueString[any](target, delimiter, pairDelimiter, ottl.NewTestingOptional[bool](false)) + assert.Error(t, err) + + delimiter = ottl.NewTestingOptional[string](" ") + _, err = toKeyValueString[any](target, delimiter, ottl.Optional[string]{}, ottl.NewTestingOptional[bool](false)) + assert.Error(t, err) +} + +func Test_toKeyValueString_bad_target(t *testing.T) { + target := ottl.StandardPMapGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return 1, nil + }, + } + delimiter := ottl.NewTestingOptional[string]("=") + pairDelimiter := ottl.NewTestingOptional[string]("!") + exprFunc, err := toKeyValueString[any](target, delimiter, pairDelimiter, ottl.NewTestingOptional[bool](false)) + assert.NoError(t, err) + _, err = exprFunc(context.Background(), nil) + assert.Error(t, err) +} + +func Test_toKeyValueString_empty_target(t *testing.T) { + target := ottl.StandardPMapGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "", nil + }, + } + delimiter := ottl.NewTestingOptional[string]("=") + pairDelimiter := ottl.NewTestingOptional[string]("!") + exprFunc, err := toKeyValueString[any](target, delimiter, pairDelimiter, ottl.NewTestingOptional[bool](false)) + assert.NoError(t, err) + _, err = exprFunc(context.Background(), nil) + assert.Error(t, err) +} + +func Test_toKeyValueString_empty_delimiters(t *testing.T) { + target := ottl.StandardPMapGetter[any]{ + Getter: func(_ context.Context, _ any) (any, error) { + return "a=b c=d", nil + }, + } + delimiter := ottl.NewTestingOptional[string]("") + + _, err := toKeyValueString[any](target, delimiter, ottl.Optional[string]{}, ottl.NewTestingOptional[bool](false)) + assert.ErrorContains(t, err, "delimiter cannot be set to an empty string") + + _, err = toKeyValueString[any](target, ottl.Optional[string]{}, delimiter, ottl.NewTestingOptional[bool](false)) + assert.ErrorContains(t, err, "pair delimiter cannot be set to an empty string") +} diff --git a/pkg/ottl/ottlfuncs/functions.go b/pkg/ottl/ottlfuncs/functions.go index fc61975c6a09..5e3aa6741cad 100644 --- a/pkg/ottl/ottlfuncs/functions.go +++ b/pkg/ottl/ottlfuncs/functions.go @@ -49,6 +49,7 @@ func converters[K any]() []ottl.Factory[K] { NewGetXMLFactory[K](), NewHourFactory[K](), NewHoursFactory[K](), + NewInsertXMLFactory[K](), NewIntFactory[K](), NewIsBoolFactory[K](), NewIsDoubleFactory[K](), @@ -83,6 +84,7 @@ func converters[K any]() []ottl.Factory[K] { NewStringFactory[K](), NewSubstringFactory[K](), NewTimeFactory[K](), + NewToKeyValueStringFactory[K](), NewTruncateTimeFactory[K](), NewTraceIDFactory[K](), NewUnixFactory[K](), diff --git a/pkg/sampling/oteltracestate_test.go b/pkg/sampling/oteltracestate_test.go index 6763e6d9e177..ba96f054b70b 100644 --- a/pkg/sampling/oteltracestate_test.go +++ b/pkg/sampling/oteltracestate_test.go @@ -87,7 +87,7 @@ func TestOpenTelemetryTraceStateRValuePValue(t *testing.T) { require.Equal(t, "", otts.RValue()) // The error is oblivious to the old r-value, but that's ok. - require.Contains(t, err.Error(), "14 hex digits") + require.ErrorContains(t, err, "14 hex digits") require.Equal(t, []KV{{"p", "2"}}, otts.ExtraValues()) diff --git a/pkg/stanza/adapter/receiver.go b/pkg/stanza/adapter/receiver.go index bacef52533f4..61124e3bf3c7 100644 --- a/pkg/stanza/adapter/receiver.go +++ b/pkg/stanza/adapter/receiver.go @@ -65,7 +65,7 @@ func (r *receiver) Start(ctx context.Context, host component.Host) error { // ... // * second one which reads all the logs produced by the converter - // (aggregated by Resource) and then calls consumer to consumer them. + // (aggregated by Resource) and then calls consumer to consume them. r.consumeWg.Add(1) go r.consumerLoop(rctx) diff --git a/pkg/stanza/entry/attribute_field_test.go b/pkg/stanza/entry/attribute_field_test.go index ade5c61bd999..ad55479d4279 100644 --- a/pkg/stanza/entry/attribute_field_test.go +++ b/pkg/stanza/entry/attribute_field_test.go @@ -460,13 +460,11 @@ func TestAttributeFieldUnmarshalFailure(t *testing.T) { t.Run(tc.name, func(t *testing.T) { var fy AttributeField err := yaml.UnmarshalStrict(tc.invalid, &fy) - require.Error(t, err) - require.Contains(t, err.Error(), tc.expectedErr) + require.ErrorContains(t, err, tc.expectedErr) var fj AttributeField err = json.Unmarshal(tc.invalid, &fj) - require.Error(t, err) - require.Contains(t, err.Error(), tc.expectedErr) + require.ErrorContains(t, err, tc.expectedErr) }) } } diff --git a/pkg/stanza/entry/body_field_test.go b/pkg/stanza/entry/body_field_test.go index 66100bb33adf..48238eda3a25 100644 --- a/pkg/stanza/entry/body_field_test.go +++ b/pkg/stanza/entry/body_field_test.go @@ -386,13 +386,11 @@ func TestBodyFieldUnmarshalFailure(t *testing.T) { t.Run(tc.name, func(t *testing.T) { var fy BodyField err := yaml.UnmarshalStrict(tc.invalid, &fy) - require.Error(t, err) - require.Contains(t, err.Error(), tc.expectedErr) + require.ErrorContains(t, err, tc.expectedErr) var fj BodyField err = json.Unmarshal(tc.invalid, &fj) - require.Error(t, err) - require.Contains(t, err.Error(), tc.expectedErr) + require.ErrorContains(t, err, tc.expectedErr) }) } } diff --git a/pkg/stanza/entry/entry_test.go b/pkg/stanza/entry/entry_test.go index 1486ad1ace75..8d944156d947 100644 --- a/pkg/stanza/entry/entry_test.go +++ b/pkg/stanza/entry/entry_test.go @@ -275,8 +275,7 @@ func TestReadToInterfaceMapWithMissingField(t *testing.T) { field := NewAttributeField("label") dest := map[string]any{} err := entry.readToInterfaceMap(field, &dest) - require.Error(t, err) - require.Contains(t, err.Error(), "can not be read as a map[string]any") + require.ErrorContains(t, err, "can not be read as a map[string]any") } func TestReadToStringMapWithMissingField(t *testing.T) { @@ -284,8 +283,7 @@ func TestReadToStringMapWithMissingField(t *testing.T) { field := NewAttributeField("label") dest := map[string]string{} err := entry.readToStringMap(field, &dest) - require.Error(t, err) - require.Contains(t, err.Error(), "can not be read as a map[string]string") + require.ErrorContains(t, err, "can not be read as a map[string]string") } func TestReadToInterfaceMissingField(t *testing.T) { @@ -293,8 +291,7 @@ func TestReadToInterfaceMissingField(t *testing.T) { field := NewAttributeField("label") var dest any err := entry.readToInterface(field, &dest) - require.Error(t, err) - require.Contains(t, err.Error(), "can not be read as a any") + require.ErrorContains(t, err, "can not be read as a any") } func TestDefaultTimestamps(t *testing.T) { diff --git a/pkg/stanza/entry/field_test.go b/pkg/stanza/entry/field_test.go index f07c4c3b45de..617b812790dc 100644 --- a/pkg/stanza/entry/field_test.go +++ b/pkg/stanza/entry/field_test.go @@ -143,13 +143,11 @@ func TestFieldUnmarshalJSON(t *testing.T) { switch { case tc.expectedErrRootable != "": - require.Error(t, err) - require.Contains(t, err.Error(), tc.expectedErr) + require.ErrorContains(t, err, tc.expectedErr) require.Error(t, errRootable) require.Contains(t, errRootable.Error(), tc.expectedErrRootable) case tc.expectedErr != "": - require.Error(t, err) - require.Contains(t, err.Error(), tc.expectedErr) + require.ErrorContains(t, err, tc.expectedErr) require.NoError(t, errRootable) require.Equal(t, tc.expected, rootableField.Field) default: @@ -233,8 +231,7 @@ func TestFieldUnmarshalYAMLFailure(t *testing.T) { t.Run(tc.name, func(t *testing.T) { var f Field err := yaml.UnmarshalStrict(tc.input, &f) - require.Error(t, err) - require.Contains(t, err.Error(), tc.expected) + require.ErrorContains(t, err, tc.expected) }) } } @@ -284,8 +281,7 @@ func TestFromJSONDot(t *testing.T) { func TestFieldFromStringInvalidSplit(t *testing.T) { _, err := NewField("resource[test]") - require.Error(t, err) - require.Contains(t, err.Error(), "splitting field") + require.ErrorContains(t, err, "splitting field") } func TestFieldFromStringWithResource(t *testing.T) { diff --git a/pkg/stanza/entry/resource_field_test.go b/pkg/stanza/entry/resource_field_test.go index 6dbe6c499699..75a4f95c2a00 100644 --- a/pkg/stanza/entry/resource_field_test.go +++ b/pkg/stanza/entry/resource_field_test.go @@ -460,13 +460,11 @@ func TestResourceFieldUnmarshalFailure(t *testing.T) { t.Run(tc.name, func(t *testing.T) { var fy ResourceField err := yaml.UnmarshalStrict(tc.invalid, &fy) - require.Error(t, err) - require.Contains(t, err.Error(), tc.expectedErr) + require.ErrorContains(t, err, tc.expectedErr) var fj ResourceField err = json.Unmarshal(tc.invalid, &fj) - require.Error(t, err) - require.Contains(t, err.Error(), tc.expectedErr) + require.ErrorContains(t, err, tc.expectedErr) }) } } diff --git a/pkg/stanza/operator/config_test.go b/pkg/stanza/operator/config_test.go index 14375683a424..8d3899634f74 100644 --- a/pkg/stanza/operator/config_test.go +++ b/pkg/stanza/operator/config_test.go @@ -43,24 +43,21 @@ func TestUnmarshalJSONErrors(t *testing.T) { raw := `{}}` cfg := &Config{} err := cfg.UnmarshalJSON([]byte(raw)) - require.Error(t, err) - require.Contains(t, err.Error(), "invalid") + require.ErrorContains(t, err, "invalid") }) t.Run("MissingType", func(t *testing.T) { raw := `{"id":"stdout"}` var cfg Config err := json.Unmarshal([]byte(raw), &cfg) - require.Error(t, err) - require.Contains(t, err.Error(), "missing required field") + require.ErrorContains(t, err, "missing required field") }) t.Run("UnknownType", func(t *testing.T) { raw := `{"id":"stdout","type":"nonexist"}` var cfg Config err := json.Unmarshal([]byte(raw), &cfg) - require.Error(t, err) - require.Contains(t, err.Error(), "unsupported type") + require.ErrorContains(t, err, "unsupported type") }) t.Run("TypeSpecificUnmarshal", func(t *testing.T) { @@ -68,8 +65,7 @@ func TestUnmarshalJSONErrors(t *testing.T) { Register("operator", func() Builder { return &FakeBuilder{} }) var cfg Config err := json.Unmarshal([]byte(raw), &cfg) - require.Error(t, err) - require.Contains(t, err.Error(), "cannot unmarshal string into") + require.ErrorContains(t, err, "cannot unmarshal string into") }) } @@ -87,32 +83,28 @@ func TestUnmarshalYAMLErrors(t *testing.T) { raw := `-- - \n||\\` var cfg Config err := yaml.Unmarshal([]byte(raw), &cfg) - require.Error(t, err) - require.Contains(t, err.Error(), "failed ") + require.ErrorContains(t, err, "failed ") }) t.Run("MissingType", func(t *testing.T) { raw := "id: operator\n" var cfg Config err := yaml.Unmarshal([]byte(raw), &cfg) - require.Error(t, err) - require.Contains(t, err.Error(), "missing required field") + require.ErrorContains(t, err, "missing required field") }) t.Run("NonStringType", func(t *testing.T) { raw := "id: operator\ntype: 123" var cfg Config err := yaml.Unmarshal([]byte(raw), &cfg) - require.Error(t, err) - require.Contains(t, err.Error(), "non-string type") + require.ErrorContains(t, err, "non-string type") }) t.Run("UnknownType", func(t *testing.T) { raw := "id: operator\ntype: unknown\n" var cfg Config err := yaml.Unmarshal([]byte(raw), &cfg) - require.Error(t, err) - require.Contains(t, err.Error(), "unsupported type") + require.ErrorContains(t, err, "unsupported type") }) t.Run("TypeSpecificUnmarshal", func(t *testing.T) { @@ -120,7 +112,6 @@ func TestUnmarshalYAMLErrors(t *testing.T) { Register("operator", func() Builder { return &FakeBuilder{} }) var cfg Config err := yaml.Unmarshal([]byte(raw), &cfg) - require.Error(t, err) - require.Contains(t, err.Error(), "cannot unmarshal !!str") + require.ErrorContains(t, err, "cannot unmarshal !!str") }) } diff --git a/pkg/stanza/operator/helper/input_test.go b/pkg/stanza/operator/helper/input_test.go index 8d3e16a704c7..cfa58c304936 100644 --- a/pkg/stanza/operator/helper/input_test.go +++ b/pkg/stanza/operator/helper/input_test.go @@ -23,8 +23,7 @@ func TestInputConfigMissingBase(t *testing.T) { set := componenttest.NewNopTelemetrySettings() _, err := config.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "missing required `type` field.") + require.ErrorContains(t, err, "missing required `type` field.") } func TestInputConfigMissingOutput(t *testing.T) { diff --git a/pkg/stanza/operator/helper/operator_test.go b/pkg/stanza/operator/helper/operator_test.go index 99f7f6b8eb58..41577e1cfdc6 100644 --- a/pkg/stanza/operator/helper/operator_test.go +++ b/pkg/stanza/operator/helper/operator_test.go @@ -46,8 +46,7 @@ func TestBasicConfigBuildWithoutType(t *testing.T) { set := componenttest.NewNopTelemetrySettings() _, err := config.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "missing required `type` field.") + require.ErrorContains(t, err, "missing required `type` field.") } func TestBasicConfigBuildMissingLogger(t *testing.T) { @@ -59,8 +58,7 @@ func TestBasicConfigBuildMissingLogger(t *testing.T) { set := componenttest.NewNopTelemetrySettings() set.Logger = nil _, err := config.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "operator build context is missing a logger.") + require.ErrorContains(t, err, "operator build context is missing a logger.") } func TestBasicConfigBuildValid(t *testing.T) { diff --git a/pkg/stanza/operator/helper/output_test.go b/pkg/stanza/operator/helper/output_test.go index 2dc62b929fb2..b55e33abd4ca 100644 --- a/pkg/stanza/operator/helper/output_test.go +++ b/pkg/stanza/operator/helper/output_test.go @@ -17,8 +17,7 @@ func TestOutputConfigMissingBase(t *testing.T) { config := OutputConfig{} set := componenttest.NewNopTelemetrySettings() _, err := config.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "missing required `type` field.") + require.ErrorContains(t, err, "missing required `type` field.") } func TestOutputConfigBuildValid(t *testing.T) { @@ -84,6 +83,5 @@ func TestOutputOperatorSetOutputs(t *testing.T) { } err := output.SetOutputs([]operator.Operator{}) - require.Error(t, err) - require.Contains(t, err.Error(), "Operator can not output") + require.ErrorContains(t, err, "Operator can not output") } diff --git a/pkg/stanza/operator/helper/parser_test.go b/pkg/stanza/operator/helper/parser_test.go index e7d635377d1e..36a5fbb37f91 100644 --- a/pkg/stanza/operator/helper/parser_test.go +++ b/pkg/stanza/operator/helper/parser_test.go @@ -24,8 +24,7 @@ func TestParserConfigMissingBase(t *testing.T) { config := ParserConfig{} set := componenttest.NewNopTelemetrySettings() _, err := config.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "missing required `type` field.") + require.ErrorContains(t, err, "missing required `type` field.") } func TestParserConfigInvalidTimeParser(t *testing.T) { @@ -39,8 +38,7 @@ func TestParserConfigInvalidTimeParser(t *testing.T) { set := componenttest.NewNopTelemetrySettings() _, err := cfg.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "missing required configuration parameter `layout`") + require.ErrorContains(t, err, "missing required configuration parameter `layout`") } func TestParserConfigBodyCollision(t *testing.T) { @@ -52,8 +50,7 @@ func TestParserConfigBodyCollision(t *testing.T) { set := componenttest.NewNopTelemetrySettings() _, err := cfg.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "`parse_to: body` not allowed when `body` is configured") + require.ErrorContains(t, err, "`parse_to: body` not allowed when `body` is configured") } func TestParserConfigBuildValid(t *testing.T) { @@ -123,8 +120,7 @@ func TestParserMissingField(t *testing.T) { ctx := context.Background() testEntry := entry.New() err := parser.ProcessWith(ctx, testEntry, parse) - require.Error(t, err) - require.Contains(t, err.Error(), "Entry is missing the expected parse_from field.") + require.ErrorContains(t, err, "Entry is missing the expected parse_from field.") } func TestParserInvalidParseDrop(t *testing.T) { @@ -142,8 +138,7 @@ func TestParserInvalidParseDrop(t *testing.T) { ctx := context.Background() testEntry := entry.New() err := parser.ProcessWith(ctx, testEntry, parse) - require.Error(t, err) - require.Contains(t, err.Error(), "parse failure") + require.ErrorContains(t, err, "parse failure") fakeOut.ExpectNoEntry(t, 100*time.Millisecond) } @@ -162,8 +157,7 @@ func TestParserInvalidParseSend(t *testing.T) { ctx := context.Background() testEntry := entry.New() err := parser.ProcessWith(ctx, testEntry, parse) - require.Error(t, err) - require.Contains(t, err.Error(), "parse failure") + require.ErrorContains(t, err, "parse failure") fakeOut.ExpectEntry(t, testEntry) fakeOut.ExpectNoEntry(t, 100*time.Millisecond) } @@ -190,8 +184,7 @@ func TestParserInvalidTimeParseDrop(t *testing.T) { ctx := context.Background() testEntry := entry.New() err := parser.ProcessWith(ctx, testEntry, parse) - require.Error(t, err) - require.Contains(t, err.Error(), "time parser: log entry does not have the expected parse_from field") + require.ErrorContains(t, err, "time parser: log entry does not have the expected parse_from field") fakeOut.ExpectNoEntry(t, 100*time.Millisecond) } @@ -217,8 +210,7 @@ func TestParserInvalidTimeParseSend(t *testing.T) { ctx := context.Background() testEntry := entry.New() err := parser.ProcessWith(ctx, testEntry, parse) - require.Error(t, err) - require.Contains(t, err.Error(), "time parser: log entry does not have the expected parse_from field") + require.ErrorContains(t, err, "time parser: log entry does not have the expected parse_from field") fakeOut.ExpectEntry(t, testEntry) fakeOut.ExpectNoEntry(t, 100*time.Millisecond) } @@ -241,8 +233,7 @@ func TestParserInvalidSeverityParseDrop(t *testing.T) { ctx := context.Background() testEntry := entry.New() err := parser.ProcessWith(ctx, testEntry, parse) - require.Error(t, err) - require.Contains(t, err.Error(), "severity parser: log entry does not have the expected parse_from field") + require.ErrorContains(t, err, "severity parser: log entry does not have the expected parse_from field") fakeOut.ExpectNoEntry(t, 100*time.Millisecond) } @@ -284,8 +275,7 @@ func TestParserInvalidTimeValidSeverityParse(t *testing.T) { require.NoError(t, err) err = parser.ProcessWith(ctx, testEntry, parse) - require.Error(t, err) - require.Contains(t, err.Error(), "time parser: log entry does not have the expected parse_from field") + require.ErrorContains(t, err, "time parser: log entry does not have the expected parse_from field") // But, this should have been set anyways require.Equal(t, entry.Info, testEntry.Severity) @@ -339,8 +329,7 @@ func TestParserValidTimeInvalidSeverityParse(t *testing.T) { require.NoError(t, err) err = parser.ProcessWith(ctx, testEntry, parse) - require.Error(t, err) - require.Contains(t, err.Error(), "severity parser: log entry does not have the expected parse_from field") + require.ErrorContains(t, err, "severity parser: log entry does not have the expected parse_from field") require.Equal(t, expected, testEntry.Timestamp) } diff --git a/pkg/stanza/operator/helper/time_test.go b/pkg/stanza/operator/helper/time_test.go index 51b4dec7979a..0d06b456e1a9 100644 --- a/pkg/stanza/operator/helper/time_test.go +++ b/pkg/stanza/operator/helper/time_test.go @@ -571,8 +571,7 @@ func TestSetInvalidLocation(t *testing.T) { tp := NewTimeParser() tp.Location = "not_a_location" err := tp.setLocation() - require.Error(t, err) - require.Contains(t, err.Error(), "failed to load location "+"not_a_location") + require.ErrorContains(t, err, "failed to load location "+"not_a_location") } func TestUnmarshal(t *testing.T) { diff --git a/pkg/stanza/operator/helper/transformer_test.go b/pkg/stanza/operator/helper/transformer_test.go index 9e1ed76da5cd..9bacf0fd6e7f 100644 --- a/pkg/stanza/operator/helper/transformer_test.go +++ b/pkg/stanza/operator/helper/transformer_test.go @@ -26,8 +26,7 @@ func TestTransformerConfigMissingBase(t *testing.T) { cfg.OutputIDs = []string{"test-output"} set := componenttest.NewNopTelemetrySettings() _, err := cfg.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "missing required `type` field.") + require.ErrorContains(t, err, "missing required `type` field.") } func TestTransformerConfigMissingOutput(t *testing.T) { @@ -58,8 +57,7 @@ func TestTransformerOnErrorInvalid(t *testing.T) { cfg.OnError = "invalid" set := componenttest.NewNopTelemetrySettings() _, err := cfg.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "operator config has an invalid `on_error` field.") + require.ErrorContains(t, err, "operator config has an invalid `on_error` field.") } func TestTransformerOperatorCanProcess(t *testing.T) { diff --git a/pkg/stanza/operator/helper/writer_test.go b/pkg/stanza/operator/helper/writer_test.go index 5505984920b5..385c536cf080 100644 --- a/pkg/stanza/operator/helper/writer_test.go +++ b/pkg/stanza/operator/helper/writer_test.go @@ -119,8 +119,7 @@ func TestWriterSetOutputsMissing(t *testing.T) { } err := writer.SetOutputs([]operator.Operator{output1}) - require.Error(t, err) - require.Contains(t, err.Error(), "does not exist") + require.ErrorContains(t, err, "does not exist") } func TestWriterSetOutputsInvalid(t *testing.T) { @@ -132,8 +131,7 @@ func TestWriterSetOutputsInvalid(t *testing.T) { } err := writer.SetOutputs([]operator.Operator{output1}) - require.Error(t, err) - require.Contains(t, err.Error(), "can not process entries") + require.ErrorContains(t, err, "can not process entries") } func TestWriterSetOutputsValid(t *testing.T) { diff --git a/pkg/stanza/operator/input/windows/bookmark_test.go b/pkg/stanza/operator/input/windows/bookmark_test.go index 988d6a3bc995..28a318243dab 100644 --- a/pkg/stanza/operator/input/windows/bookmark_test.go +++ b/pkg/stanza/operator/input/windows/bookmark_test.go @@ -14,16 +14,14 @@ import ( func TestBookmarkOpenPreexisting(t *testing.T) { bookmark := Bookmark{handle: 5} err := bookmark.Open("") - require.Error(t, err) - require.Contains(t, err.Error(), "bookmark handle is already open") + require.ErrorContains(t, err, "bookmark handle is already open") } func TestBookmarkOpenInvalidUTF8(t *testing.T) { bookmark := NewBookmark() invalidUTF8 := "\u0000" err := bookmark.Open(invalidUTF8) - require.Error(t, err) - require.Contains(t, err.Error(), "failed to convert bookmark xml to utf16") + require.ErrorContains(t, err, "failed to convert bookmark xml to utf16") } func TestBookmarkOpenSyscallFailure(t *testing.T) { @@ -31,8 +29,7 @@ func TestBookmarkOpenSyscallFailure(t *testing.T) { xml := "<\\bookmark>" createBookmarkProc = SimpleMockProc(0, 0, ErrorNotSupported) err := bookmark.Open(xml) - require.Error(t, err) - require.Contains(t, err.Error(), "failed to create bookmark handle from xml") + require.ErrorContains(t, err, "failed to create bookmark handle from xml") } func TestBookmarkOpenSuccess(t *testing.T) { @@ -49,8 +46,7 @@ func TestBookmarkUpdateFailureOnCreateSyscall(t *testing.T) { bookmark := NewBookmark() createBookmarkProc = SimpleMockProc(0, 0, ErrorNotSupported) err := bookmark.Update(event) - require.Error(t, err) - require.Contains(t, err.Error(), "syscall to `EvtCreateBookmark` failed") + require.ErrorContains(t, err, "syscall to `EvtCreateBookmark` failed") } func TestBookmarkUpdateFailureOnUpdateSyscall(t *testing.T) { @@ -59,8 +55,7 @@ func TestBookmarkUpdateFailureOnUpdateSyscall(t *testing.T) { createBookmarkProc = SimpleMockProc(1, 0, ErrorSuccess) updateBookmarkProc = SimpleMockProc(0, 0, ErrorNotSupported) err := bookmark.Update(event) - require.Error(t, err) - require.Contains(t, err.Error(), "syscall to `EvtUpdateBookmark` failed") + require.ErrorContains(t, err, "syscall to `EvtUpdateBookmark` failed") } func TestBookmarkUpdateSuccess(t *testing.T) { @@ -83,8 +78,7 @@ func TestBookmarkCloseSyscallFailure(t *testing.T) { bookmark := Bookmark{handle: 5} closeProc = SimpleMockProc(0, 0, ErrorNotSupported) err := bookmark.Close() - require.Error(t, err) - require.Contains(t, err.Error(), "failed to close bookmark handle") + require.ErrorContains(t, err, "failed to close bookmark handle") } func TestBookmarkCloseSuccess(t *testing.T) { @@ -99,8 +93,7 @@ func TestBookmarkRenderWhenClosed(t *testing.T) { bookmark := NewBookmark() buffer := NewBuffer() _, err := bookmark.Render(buffer) - require.Error(t, err) - require.Contains(t, err.Error(), "bookmark handle is not open") + require.ErrorContains(t, err, "bookmark handle is not open") } func TestBookmarkRenderInvalidSyscall(t *testing.T) { @@ -108,6 +101,5 @@ func TestBookmarkRenderInvalidSyscall(t *testing.T) { buffer := NewBuffer() renderProc = SimpleMockProc(0, 0, ErrorNotSupported) _, err := bookmark.Render(buffer) - require.Error(t, err) - require.Contains(t, err.Error(), "syscall to 'EvtRender' failed") + require.ErrorContains(t, err, "syscall to 'EvtRender' failed") } diff --git a/pkg/stanza/operator/input/windows/event_test.go b/pkg/stanza/operator/input/windows/event_test.go index 0acc6240c62c..4650cdf736ce 100644 --- a/pkg/stanza/operator/input/windows/event_test.go +++ b/pkg/stanza/operator/input/windows/event_test.go @@ -21,8 +21,7 @@ func TestEventCloseSyscallFailure(t *testing.T) { event := NewEvent(5) closeProc = SimpleMockProc(0, 0, ErrorNotSupported) err := event.Close() - require.Error(t, err) - require.Contains(t, err.Error(), "failed to close event handle") + require.ErrorContains(t, err, "failed to close event handle") } func TestEventCloseSuccess(t *testing.T) { diff --git a/pkg/stanza/operator/input/windows/input_test.go b/pkg/stanza/operator/input/windows/input_test.go index 4597a924d74f..6d530f89bca1 100644 --- a/pkg/stanza/operator/input/windows/input_test.go +++ b/pkg/stanza/operator/input/windows/input_test.go @@ -34,8 +34,7 @@ func TestInputStart_LocalSubscriptionError(t *testing.T) { input.pollInterval = 1 * time.Second err := input.Start(persister) - assert.Error(t, err) - assert.Contains(t, err.Error(), "The specified channel could not be found") + assert.ErrorContains(t, err, "The specified channel could not be found") } // TestInputStart_RemoteSubscriptionError ensures the input correctly handles remote subscription errors. @@ -52,8 +51,7 @@ func TestInputStart_RemoteSubscriptionError(t *testing.T) { } err := input.Start(persister) - assert.Error(t, err) - assert.Contains(t, err.Error(), "The specified channel could not be found") + assert.ErrorContains(t, err, "The specified channel could not be found") } // TestInputStart_RemoteSessionError ensures the input correctly handles remote session errors. @@ -72,8 +70,7 @@ func TestInputStart_RemoteSessionError(t *testing.T) { } err := input.Start(persister) - assert.Error(t, err) - assert.Contains(t, err.Error(), "failed to start remote session for server remote-server: remote session error") + assert.ErrorContains(t, err, "failed to start remote session for server remote-server: remote session error") } // TestInputStart_RemoteAccessDeniedError ensures the input correctly handles remote access denied errors. @@ -97,9 +94,8 @@ func TestInputStart_RemoteAccessDeniedError(t *testing.T) { } err := input.Start(persister) - assert.Error(t, err) - assert.Contains(t, err.Error(), "failed to open subscription for remote server") - assert.Contains(t, err.Error(), "Access is denied") + assert.ErrorContains(t, err, "failed to open subscription for remote server") + assert.ErrorContains(t, err, "Access is denied") } // TestInputStart_BadChannelName ensures the input correctly handles bad channel names. @@ -123,7 +119,6 @@ func TestInputStart_BadChannelName(t *testing.T) { } err := input.Start(persister) - assert.Error(t, err) - assert.Contains(t, err.Error(), "failed to open subscription for remote server") - assert.Contains(t, err.Error(), "The specified channel could not be found") + assert.ErrorContains(t, err, "failed to open subscription for remote server") + assert.ErrorContains(t, err, "The specified channel could not be found") } diff --git a/pkg/stanza/operator/input/windows/publisher_test.go b/pkg/stanza/operator/input/windows/publisher_test.go index 34da0b15c07d..75ca47798d20 100644 --- a/pkg/stanza/operator/input/windows/publisher_test.go +++ b/pkg/stanza/operator/input/windows/publisher_test.go @@ -14,8 +14,7 @@ import ( func TestPublisherOpenPreexisting(t *testing.T) { publisher := Publisher{handle: 5} err := publisher.Open("provider_name_does_not_matter_for_this_test") - require.Error(t, err) - require.Contains(t, err.Error(), "publisher handle is already open") + require.ErrorContains(t, err, "publisher handle is already open") require.True(t, publisher.Valid()) } @@ -23,8 +22,7 @@ func TestPublisherOpenInvalidUTF8(t *testing.T) { publisher := NewPublisher() invalidUTF8 := "\u0000" err := publisher.Open(invalidUTF8) - require.Error(t, err) - require.Contains(t, err.Error(), "failed to convert the provider name \"\\x00\" to utf16: invalid argument") + require.ErrorContains(t, err, "failed to convert the provider name \"\\x00\" to utf16: invalid argument") require.False(t, publisher.Valid()) } @@ -33,8 +31,7 @@ func TestPublisherOpenSyscallFailure(t *testing.T) { provider := "provider" defer mockWithDeferredRestore(&openPublisherMetadataProc, SimpleMockProc(0, 0, ErrorNotSupported))() err := publisher.Open(provider) - require.Error(t, err) - require.Contains(t, err.Error(), "failed to open the metadata for the \"provider\" provider: The request is not supported.") + require.ErrorContains(t, err, "failed to open the metadata for the \"provider\" provider: The request is not supported.") require.False(t, publisher.Valid()) } @@ -59,8 +56,7 @@ func TestPublisherCloseSyscallFailure(t *testing.T) { publisher := Publisher{handle: 5} defer mockWithDeferredRestore(&closeProc, SimpleMockProc(0, 0, ErrorNotSupported))() err := publisher.Close() - require.Error(t, err) - require.Contains(t, err.Error(), "failed to close publisher") + require.ErrorContains(t, err, "failed to close publisher") require.True(t, publisher.Valid()) } diff --git a/pkg/stanza/operator/output/drop/output_test.go b/pkg/stanza/operator/output/drop/output_test.go index 44e48499d84e..520dcfee6e4b 100644 --- a/pkg/stanza/operator/output/drop/output_test.go +++ b/pkg/stanza/operator/output/drop/output_test.go @@ -26,8 +26,7 @@ func TestBuildIvalid(t *testing.T) { set := componenttest.NewNopTelemetrySettings() set.Logger = nil _, err := cfg.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "build context is missing a logger") + require.ErrorContains(t, err, "build context is missing a logger") } func TestProcess(t *testing.T) { diff --git a/pkg/stanza/operator/parser/container/parser_test.go b/pkg/stanza/operator/parser/container/parser_test.go index 7e58e616b479..44c430ce4cfc 100644 --- a/pkg/stanza/operator/parser/container/parser_test.go +++ b/pkg/stanza/operator/parser/container/parser_test.go @@ -39,8 +39,7 @@ func TestConfigBuildFailure(t *testing.T) { config.OnError = "invalid_on_error" set := componenttest.NewNopTelemetrySettings() _, err := config.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "invalid `on_error` field") + require.ErrorContains(t, err, "invalid `on_error` field") } func TestConfigBuildFormatError(t *testing.T) { @@ -48,29 +47,25 @@ func TestConfigBuildFormatError(t *testing.T) { config.Format = "invalid_runtime" set := componenttest.NewNopTelemetrySettings() _, err := config.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "invalid `format` field") + require.ErrorContains(t, err, "invalid `format` field") } func TestDockerParserInvalidType(t *testing.T) { parser := newTestParser(t) _, err := parser.parseDocker([]int{}) - require.Error(t, err) - require.Contains(t, err.Error(), "type '[]int' cannot be parsed as docker container logs") + require.ErrorContains(t, err, "type '[]int' cannot be parsed as docker container logs") } func TestCrioParserInvalidType(t *testing.T) { parser := newTestParser(t) _, err := parser.parseCRIO([]int{}) - require.Error(t, err) - require.Contains(t, err.Error(), "type '[]int' cannot be parsed as cri-o container logs") + require.ErrorContains(t, err, "type '[]int' cannot be parsed as cri-o container logs") } func TestContainerdParserInvalidType(t *testing.T) { parser := newTestParser(t) _, err := parser.parseContainerd([]int{}) - require.Error(t, err) - require.Contains(t, err.Error(), "type '[]int' cannot be parsed as containerd logs") + require.ErrorContains(t, err, "type '[]int' cannot be parsed as containerd logs") } func TestFormatDetectionFailure(t *testing.T) { @@ -79,8 +74,7 @@ func TestFormatDetectionFailure(t *testing.T) { Body: `invalid container format`, } _, err := parser.detectFormat(e) - require.Error(t, err) - require.Contains(t, err.Error(), "entry cannot be parsed as container logs") + require.ErrorContains(t, err, "entry cannot be parsed as container logs") } func TestInternalRecombineCfg(t *testing.T) { diff --git a/pkg/stanza/operator/parser/csv/parser_test.go b/pkg/stanza/operator/parser/csv/parser_test.go index 27fd4a7a94ea..daab359ed2e1 100644 --- a/pkg/stanza/operator/parser/csv/parser_test.go +++ b/pkg/stanza/operator/parser/csv/parser_test.go @@ -41,8 +41,7 @@ func TestParserBuildFailure(t *testing.T) { cfg.OnError = "invalid_on_error" set := componenttest.NewNopTelemetrySettings() _, err := cfg.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "invalid `on_error` field") + require.ErrorContains(t, err, "invalid `on_error` field") } func TestParserBuildFailureLazyIgnoreQuotes(t *testing.T) { @@ -62,8 +61,7 @@ func TestParserBuildFailureInvalidDelimiter(t *testing.T) { cfg.FieldDelimiter = ";;" set := componenttest.NewNopTelemetrySettings() _, err := cfg.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "invalid 'delimiter': ';;'") + require.ErrorContains(t, err, "invalid 'delimiter': ';;'") } func TestParserBuildFailureBadHeaderConfig(t *testing.T) { @@ -72,36 +70,31 @@ func TestParserBuildFailureBadHeaderConfig(t *testing.T) { cfg.HeaderAttribute = "testheader" set := componenttest.NewNopTelemetrySettings() _, err := cfg.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "only one header parameter can be set: 'header' or 'header_attribute'") + require.ErrorContains(t, err, "only one header parameter can be set: 'header' or 'header_attribute'") } func TestParserByteFailure(t *testing.T) { parser := newTestParser(t) _, err := parser.parse([]byte("invalid")) - require.Error(t, err) - require.Contains(t, err.Error(), "wrong number of fields: expected 3, found 1") + require.ErrorContains(t, err, "wrong number of fields: expected 3, found 1") } func TestParserStringFailure(t *testing.T) { parser := newTestParser(t) _, err := parser.parse("invalid") - require.Error(t, err) - require.Contains(t, err.Error(), "wrong number of fields: expected 3, found 1") + require.ErrorContains(t, err, "wrong number of fields: expected 3, found 1") } func TestParserInvalidType(t *testing.T) { parser := newTestParser(t) _, err := parser.parse([]int{}) - require.Error(t, err) - require.Contains(t, err.Error(), "type '[]int' cannot be parsed as csv") + require.ErrorContains(t, err, "type '[]int' cannot be parsed as csv") } func TestParserInvalidTypeIgnoreQuotes(t *testing.T) { parser := newTestParserIgnoreQuotes(t) _, err := parser.parse([]int{}) - require.Error(t, err) - require.Contains(t, err.Error(), "type '[]int' cannot be parsed as csv") + require.ErrorContains(t, err, "type '[]int' cannot be parsed as csv") } func TestParserCSV(t *testing.T) { @@ -1112,8 +1105,7 @@ func TestBuildParserCSV(t *testing.T) { c.Header = "name" set := componenttest.NewNopTelemetrySettings() _, err := c.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "missing field delimiter in header") + require.ErrorContains(t, err, "missing field delimiter in header") }) t.Run("InvalidHeaderFieldWrongDelimiter", func(t *testing.T) { @@ -1130,7 +1122,6 @@ func TestBuildParserCSV(t *testing.T) { c.FieldDelimiter = ":" set := componenttest.NewNopTelemetrySettings() _, err := c.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "missing field delimiter in header") + require.ErrorContains(t, err, "missing field delimiter in header") }) } diff --git a/pkg/stanza/operator/parser/json/parser_test.go b/pkg/stanza/operator/parser/json/parser_test.go index f9efe32a01c2..4563b4ded816 100644 --- a/pkg/stanza/operator/parser/json/parser_test.go +++ b/pkg/stanza/operator/parser/json/parser_test.go @@ -40,29 +40,25 @@ func TestConfigBuildFailure(t *testing.T) { config.OnError = "invalid_on_error" set := componenttest.NewNopTelemetrySettings() _, err := config.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "invalid `on_error` field") + require.ErrorContains(t, err, "invalid `on_error` field") } func TestParserStringFailure(t *testing.T) { parser := newTestParser(t) _, err := parser.parse("invalid") - require.Error(t, err) - require.Contains(t, err.Error(), "expected { character for map value") + require.ErrorContains(t, err, "expected { character for map value") } func TestParserByteFailure(t *testing.T) { parser := newTestParser(t) _, err := parser.parse([]byte("invalid")) - require.Error(t, err) - require.Contains(t, err.Error(), "type []uint8 cannot be parsed as JSON") + require.ErrorContains(t, err, "type []uint8 cannot be parsed as JSON") } func TestParserInvalidType(t *testing.T) { parser := newTestParser(t) _, err := parser.parse([]int{}) - require.Error(t, err) - require.Contains(t, err.Error(), "type []int cannot be parsed as JSON") + require.ErrorContains(t, err, "type []int cannot be parsed as JSON") } func TestJSONImplementations(t *testing.T) { diff --git a/pkg/stanza/operator/parser/jsonarray/config_test.go b/pkg/stanza/operator/parser/jsonarray/config_test.go index 442e67d68a86..73b8bd8c7bda 100644 --- a/pkg/stanza/operator/parser/jsonarray/config_test.go +++ b/pkg/stanza/operator/parser/jsonarray/config_test.go @@ -92,7 +92,7 @@ func TestBuildWithFeatureGate(t *testing.T) { set := componenttest.NewNopTelemetrySettings() _, err := buildFunc().Build(set) if err != nil { - require.Contains(t, err.Error(), c.onErr) + require.ErrorContains(t, err, c.onErr) } }) } diff --git a/pkg/stanza/operator/parser/jsonarray/parser_test.go b/pkg/stanza/operator/parser/jsonarray/parser_test.go index a07131e0a75e..f20a2f8be43d 100644 --- a/pkg/stanza/operator/parser/jsonarray/parser_test.go +++ b/pkg/stanza/operator/parser/jsonarray/parser_test.go @@ -33,15 +33,13 @@ func TestParserBuildFailure(t *testing.T) { cfg.OnError = "invalid_on_error" set := componenttest.NewNopTelemetrySettings() _, err := cfg.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "invalid `on_error` field") + require.ErrorContains(t, err, "invalid `on_error` field") } func TestParserInvalidType(t *testing.T) { parser := newTestParser(t) _, err := parser.parse([]int{}) - require.Error(t, err) - require.Contains(t, err.Error(), "type '[]int' cannot be parsed as json array") + require.ErrorContains(t, err, "type '[]int' cannot be parsed as json array") } func TestParserByteFailureHeadersMismatch(t *testing.T) { @@ -54,8 +52,7 @@ func TestParserByteFailureHeadersMismatch(t *testing.T) { require.NoError(t, err) parser := op.(*Parser) _, err = parser.parse("[\"stanza\",\"INFO\",\"started agent\", 42, true]") - require.Error(t, err) - require.Contains(t, err.Error(), "wrong number of fields: expected 3, found 5") + require.ErrorContains(t, err, "wrong number of fields: expected 3, found 5") } func TestParserJarray(t *testing.T) { diff --git a/pkg/stanza/operator/parser/keyvalue/parser_test.go b/pkg/stanza/operator/parser/keyvalue/parser_test.go index 4df63935dd47..640790620c9b 100644 --- a/pkg/stanza/operator/parser/keyvalue/parser_test.go +++ b/pkg/stanza/operator/parser/keyvalue/parser_test.go @@ -44,8 +44,7 @@ func TestConfigBuildFailure(t *testing.T) { config.OnError = "invalid_on_error" set := componenttest.NewNopTelemetrySettings() _, err := config.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "invalid `on_error` field") + require.ErrorContains(t, err, "invalid `on_error` field") } func TestBuild(t *testing.T) { @@ -151,22 +150,19 @@ func TestBuild(t *testing.T) { func TestParserStringFailure(t *testing.T) { parser := newTestParser(t) _, err := parser.parse("invalid") - require.Error(t, err) - require.Contains(t, err.Error(), fmt.Sprintf("cannot split %q into 2 items, got 1 item(s)", "invalid")) + require.ErrorContains(t, err, fmt.Sprintf("cannot split %q into 2 items, got 1 item(s)", "invalid")) } func TestParserInvalidType(t *testing.T) { parser := newTestParser(t) _, err := parser.parse([]int{}) - require.Error(t, err) - require.Contains(t, err.Error(), "type []int cannot be parsed as key value pairs") + require.ErrorContains(t, err, "type []int cannot be parsed as key value pairs") } func TestParserEmptyInput(t *testing.T) { parser := newTestParser(t) _, err := parser.parse("") - require.Error(t, err) - require.Contains(t, err.Error(), "parse from field body is empty") + require.ErrorContains(t, err, "parse from field body is empty") } func TestKVImplementations(t *testing.T) { diff --git a/pkg/stanza/operator/parser/regex/parser_test.go b/pkg/stanza/operator/parser/regex/parser_test.go index 8a44342e69ec..56e119bbec6e 100644 --- a/pkg/stanza/operator/parser/regex/parser_test.go +++ b/pkg/stanza/operator/parser/regex/parser_test.go @@ -36,29 +36,25 @@ func TestParserBuildFailure(t *testing.T) { cfg.OnError = "invalid_on_error" set := componenttest.NewNopTelemetrySettings() _, err := cfg.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "invalid `on_error` field") + require.ErrorContains(t, err, "invalid `on_error` field") } func TestParserByteFailure(t *testing.T) { parser := newTestParser(t, "^(?Ptest)", 0) _, err := parser.parse([]byte("invalid")) - require.Error(t, err) - require.Contains(t, err.Error(), "type '[]uint8' cannot be parsed as regex") + require.ErrorContains(t, err, "type '[]uint8' cannot be parsed as regex") } func TestParserStringFailure(t *testing.T) { parser := newTestParser(t, "^(?Ptest)", 0) _, err := parser.parse("invalid") - require.Error(t, err) - require.Contains(t, err.Error(), "regex pattern does not match") + require.ErrorContains(t, err, "regex pattern does not match") } func TestParserInvalidType(t *testing.T) { parser := newTestParser(t, "^(?Ptest)", 0) _, err := parser.parse([]int{}) - require.Error(t, err) - require.Contains(t, err.Error(), "type '[]int' cannot be parsed as regex") + require.ErrorContains(t, err, "type '[]int' cannot be parsed as regex") } func TestParserCache(t *testing.T) { @@ -67,8 +63,7 @@ func TestParserCache(t *testing.T) { require.NoError(t, parser.Stop()) }() _, err := parser.parse([]int{}) - require.Error(t, err) - require.Contains(t, err.Error(), "type '[]int' cannot be parsed as regex") + require.ErrorContains(t, err, "type '[]int' cannot be parsed as regex") require.NotNil(t, parser.cache, "expected cache to be configured") require.Equal(t, uint16(200), parser.cache.maxSize()) } @@ -197,8 +192,7 @@ func TestBuildParserRegex(t *testing.T) { c.Regex = ".*" set := componenttest.NewNopTelemetrySettings() _, err := c.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "no named capture groups") + require.ErrorContains(t, err, "no named capture groups") }) t.Run("NoNamedGroups", func(t *testing.T) { @@ -206,8 +200,7 @@ func TestBuildParserRegex(t *testing.T) { c.Regex = "(.*)" set := componenttest.NewNopTelemetrySettings() _, err := c.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "no named capture groups") + require.ErrorContains(t, err, "no named capture groups") }) } diff --git a/pkg/stanza/operator/parser/syslog/config_test.go b/pkg/stanza/operator/parser/syslog/config_test.go index 3d29fc57885d..82ceac100365 100644 --- a/pkg/stanza/operator/parser/syslog/config_test.go +++ b/pkg/stanza/operator/parser/syslog/config_test.go @@ -128,8 +128,7 @@ func TestUnmarshal(t *testing.T) { func TestParserMissingProtocol(t *testing.T) { set := componenttest.NewNopTelemetrySettings() _, err := NewConfig().Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "missing field 'protocol'") + require.ErrorContains(t, err, "missing field 'protocol'") } func TestRFC6587ConfigOptions(t *testing.T) { @@ -232,6 +231,5 @@ func TestParserInvalidLocation(t *testing.T) { set := componenttest.NewNopTelemetrySettings() _, err := config.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "failed to load location "+config.Location) + require.ErrorContains(t, err, "failed to load location "+config.Location) } diff --git a/pkg/stanza/operator/parser/syslog/parser_test.go b/pkg/stanza/operator/parser/syslog/parser_test.go index f22b04a48ab7..cbff227b19e6 100644 --- a/pkg/stanza/operator/parser/syslog/parser_test.go +++ b/pkg/stanza/operator/parser/syslog/parser_test.go @@ -70,8 +70,7 @@ func TestSyslogParseRFC5424_SDNameTooLong(t *testing.T) { newEntry := entry.New() newEntry.Body = body err = op.Process(context.Background(), newEntry) - require.Error(t, err) - require.Contains(t, err.Error(), "expecting a structured data element id (from 1 to max 32 US-ASCII characters") + require.ErrorContains(t, err, "expecting a structured data element id (from 1 to max 32 US-ASCII characters") select { case e := <-fake.Received: @@ -100,8 +99,7 @@ func TestSyslogParseRFC5424_Octet_Counting_MessageTooLong(t *testing.T) { newEntry := entry.New() newEntry.Body = body err = op.Process(context.Background(), newEntry) - require.Error(t, err) - require.Contains(t, err.Error(), "message too long to parse. was size 215, max length 214") + require.ErrorContains(t, err, "message too long to parse. was size 215, max length 214") select { case e := <-fake.Received: diff --git a/pkg/stanza/operator/parser/uri/parser_test.go b/pkg/stanza/operator/parser/uri/parser_test.go index f6c0290b3f2a..d0c856cae1e1 100644 --- a/pkg/stanza/operator/parser/uri/parser_test.go +++ b/pkg/stanza/operator/parser/uri/parser_test.go @@ -33,29 +33,25 @@ func TestParserBuildFailure(t *testing.T) { cfg.OnError = "invalid_on_error" set := componenttest.NewNopTelemetrySettings() _, err := cfg.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "invalid `on_error` field") + require.ErrorContains(t, err, "invalid `on_error` field") } func TestParserByteFailure(t *testing.T) { parser := newTestParser(t) _, err := parser.parse([]byte("invalid")) - require.Error(t, err) - require.Contains(t, err.Error(), "type '[]uint8' cannot be parsed as URI") + require.ErrorContains(t, err, "type '[]uint8' cannot be parsed as URI") } func TestParserStringFailure(t *testing.T) { parser := newTestParser(t) _, err := parser.parse("invalid") - require.Error(t, err) - require.Contains(t, err.Error(), "parse \"invalid\": invalid URI for request") + require.ErrorContains(t, err, "parse \"invalid\": invalid URI for request") } func TestParserInvalidType(t *testing.T) { parser := newTestParser(t) _, err := parser.parse([]int{}) - require.Error(t, err) - require.Contains(t, err.Error(), "type '[]int' cannot be parsed as URI") + require.ErrorContains(t, err, "type '[]int' cannot be parsed as URI") } func TestProcess(t *testing.T) { diff --git a/pkg/stanza/operator/transformer/noop/config_test.go b/pkg/stanza/operator/transformer/noop/config_test.go index 92255e04e707..18fa1dd64d89 100644 --- a/pkg/stanza/operator/transformer/noop/config_test.go +++ b/pkg/stanza/operator/transformer/noop/config_test.go @@ -23,6 +23,5 @@ func TestBuildInvalid(t *testing.T) { set := componenttest.NewNopTelemetrySettings() set.Logger = nil _, err := cfg.Build(set) - require.Error(t, err) - require.Contains(t, err.Error(), "build context is missing a logger") + require.ErrorContains(t, err, "build context is missing a logger") } diff --git a/pkg/stanza/pipeline/directed_test.go b/pkg/stanza/pipeline/directed_test.go index fc84f634403b..079ac9253565 100644 --- a/pkg/stanza/pipeline/directed_test.go +++ b/pkg/stanza/pipeline/directed_test.go @@ -101,8 +101,7 @@ func TestPipeline(t *testing.T) { operator2.On("Outputs").Return(nil) _, err := NewDirectedPipeline([]operator.Operator{operator1, operator2}) - require.Error(t, err) - require.Contains(t, err.Error(), "already exists") + require.ErrorContains(t, err, "already exists") }) t.Run("OutputNotExist", func(t *testing.T) { @@ -115,8 +114,7 @@ func TestPipeline(t *testing.T) { operator2.On("Outputs").Return([]operator.Operator{operator1}) _, err := NewDirectedPipeline([]operator.Operator{operator2}) - require.Error(t, err) - require.Contains(t, err.Error(), "does not exist") + require.ErrorContains(t, err, "does not exist") }) t.Run("OutputNotProcessor", func(t *testing.T) { @@ -132,8 +130,7 @@ func TestPipeline(t *testing.T) { operator2.On("Outputs").Return([]operator.Operator{operator1}) _, err := NewDirectedPipeline([]operator.Operator{operator1, operator2}) - require.Error(t, err) - require.Contains(t, err.Error(), "can not process") + require.ErrorContains(t, err, "can not process") }) t.Run("DuplicateEdges", func(t *testing.T) { @@ -155,8 +152,7 @@ func TestPipeline(t *testing.T) { graph.SetEdge(edge) err := connectNode(graph, node2) - require.Error(t, err) - require.Contains(t, err.Error(), "connection already exists") + require.ErrorContains(t, err, "connection already exists") }) t.Run("Cyclical", func(t *testing.T) { @@ -171,8 +167,7 @@ func TestPipeline(t *testing.T) { mockOperator3.On("SetOutputs", mock.Anything).Return(nil) _, err := NewDirectedPipeline([]operator.Operator{mockOperator1, mockOperator2, mockOperator3}) - require.Error(t, err) - require.Contains(t, err.Error(), "circular dependency") + require.ErrorContains(t, err, "circular dependency") }) } @@ -205,8 +200,7 @@ func TestPipelineStartOrder(t *testing.T) { require.NoError(t, err) err = pipeline.Start(mockPersister) - require.Error(t, err) - require.Contains(t, err.Error(), "operator 1 failed to start") + require.ErrorContains(t, err, "operator 1 failed to start") require.True(t, mock2Started) require.True(t, mock3Started) } diff --git a/pkg/translator/loki/go.mod b/pkg/translator/loki/go.mod index de16abc8a997..e3e2227fd1cc 100644 --- a/pkg/translator/loki/go.mod +++ b/pkg/translator/loki/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.110.0 - github.com/prometheus/common v0.59.1 + github.com/prometheus/common v0.60.0 github.com/prometheus/prometheus v0.54.1 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/pdata v1.16.0 @@ -31,14 +31,14 @@ require ( github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.110.0 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.20.3 // indirect + github.com/prometheus/client_golang v1.20.4 // indirect github.com/prometheus/client_model v0.6.1 // indirect github.com/prometheus/procfs v0.15.1 // indirect go.opentelemetry.io/collector/featuregate v1.16.0 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 // indirect - golang.org/x/net v0.28.0 // indirect + golang.org/x/net v0.29.0 // indirect golang.org/x/sys v0.25.0 // indirect golang.org/x/text v0.18.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd // indirect diff --git a/pkg/translator/loki/go.sum b/pkg/translator/loki/go.sum index 4e4b4c4c1564..3a383502c4e0 100644 --- a/pkg/translator/loki/go.sum +++ b/pkg/translator/loki/go.sum @@ -77,12 +77,12 @@ github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjL github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.20.3 h1:oPksm4K8B+Vt35tUhw6GbSNSgVlVSBH0qELP/7u83l4= -github.com/prometheus/client_golang v1.20.3/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= +github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= -github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= +github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= +github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= @@ -112,8 +112,8 @@ go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN8 golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= -golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8 h1:aAcj0Da7eBAtrTp03QXWvm88pSyOt+UgdZw2BFZ+lEw= golang.org/x/exp v0.0.0-20240325151524-a685a6edb6d8/go.mod h1:CQ1k9gNrJ50XIzaKCRR2hssIjF07kZFEiieALBM/ARQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -122,10 +122,10 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= -golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= 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= diff --git a/pkg/translator/prometheusremotewrite/go.mod b/pkg/translator/prometheusremotewrite/go.mod index 44e0afa3a7f7..b1361eff386d 100644 --- a/pkg/translator/prometheusremotewrite/go.mod +++ b/pkg/translator/prometheusremotewrite/go.mod @@ -6,7 +6,7 @@ require ( github.com/cespare/xxhash/v2 v2.3.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.110.0 - github.com/prometheus/common v0.59.1 + github.com/prometheus/common v0.60.0 github.com/prometheus/prometheus v0.54.1 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/pdata v1.16.0 @@ -26,7 +26,7 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_model v0.6.1 // indirect go.opentelemetry.io/collector/featuregate v1.16.0 // indirect - golang.org/x/net v0.28.0 // indirect + golang.org/x/net v0.29.0 // indirect golang.org/x/sys v0.25.0 // indirect golang.org/x/text v0.18.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd // indirect diff --git a/pkg/translator/prometheusremotewrite/go.sum b/pkg/translator/prometheusremotewrite/go.sum index 9d13ff61dcce..cc01c4818730 100644 --- a/pkg/translator/prometheusremotewrite/go.sum +++ b/pkg/translator/prometheusremotewrite/go.sum @@ -31,8 +31,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/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= -github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= +github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= +github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/prometheus v0.54.1 h1:vKuwQNjnYN2/mDoWfHXDhAsz/68q/dQDb+YbcEqU7MQ= github.com/prometheus/prometheus v0.54.1/go.mod h1:xlLByHhk2g3ycakQGrMaU8K7OySZx98BzeCR99991NY= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= @@ -62,8 +62,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= 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= diff --git a/processor/geoipprocessor/config_test.go b/processor/geoipprocessor/config_test.go index 8020bf32b1d8..746b210685fc 100644 --- a/processor/geoipprocessor/config_test.go +++ b/processor/geoipprocessor/config_test.go @@ -96,7 +96,7 @@ func TestLoadConfig_InvalidProviderKey(t *testing.T) { factories.Processors[metadata.Type] = factory _, err = otelcoltest.LoadConfigAndValidate(filepath.Join("testdata", "config-invalidProviderKey.yaml"), factories) - require.Contains(t, err.Error(), "error reading configuration for \"geoip\": invalid provider key: invalidProviderKey") + require.ErrorContains(t, err, "error reading configuration for \"geoip\": invalid provider key: invalidProviderKey") } func TestLoadConfig_ValidProviderKey(t *testing.T) { @@ -152,5 +152,5 @@ func TestLoadConfig_ProviderValidateError(t *testing.T) { factories.Processors[metadata.Type] = factory _, err = otelcoltest.LoadConfigAndValidate(filepath.Join("testdata", "config-mockProvider.yaml"), factories) - require.Contains(t, err.Error(), "error validating provider mock") + require.ErrorContains(t, err, "error validating provider mock") } diff --git a/processor/geoipprocessor/factory.go b/processor/geoipprocessor/factory.go index e8fc1dbd8aef..6f3097ad61b1 100644 --- a/processor/geoipprocessor/factory.go +++ b/processor/geoipprocessor/factory.go @@ -89,7 +89,7 @@ func createMetricsProcessor(ctx context.Context, set processor.Settings, cfg com if err != nil { return nil, err } - return processorhelper.NewMetricsProcessor(ctx, set, cfg, nextConsumer, newGeoIPProcessor(geoCfg, defaultResourceAttributes, providers).processMetrics, processorhelper.WithCapabilities(processorCapabilities)) + return processorhelper.NewMetricsProcessor(ctx, set, cfg, nextConsumer, newGeoIPProcessor(geoCfg, defaultResourceAttributes, providers, set).processMetrics, processorhelper.WithCapabilities(processorCapabilities)) } func createTracesProcessor(ctx context.Context, set processor.Settings, cfg component.Config, nextConsumer consumer.Traces) (processor.Traces, error) { @@ -98,7 +98,7 @@ func createTracesProcessor(ctx context.Context, set processor.Settings, cfg comp if err != nil { return nil, err } - return processorhelper.NewTracesProcessor(ctx, set, cfg, nextConsumer, newGeoIPProcessor(geoCfg, defaultResourceAttributes, providers).processTraces, processorhelper.WithCapabilities(processorCapabilities)) + return processorhelper.NewTracesProcessor(ctx, set, cfg, nextConsumer, newGeoIPProcessor(geoCfg, defaultResourceAttributes, providers, set).processTraces, processorhelper.WithCapabilities(processorCapabilities)) } func createLogsProcessor(ctx context.Context, set processor.Settings, cfg component.Config, nextConsumer consumer.Logs) (processor.Logs, error) { @@ -107,5 +107,5 @@ func createLogsProcessor(ctx context.Context, set processor.Settings, cfg compon if err != nil { return nil, err } - return processorhelper.NewLogsProcessor(ctx, set, cfg, nextConsumer, newGeoIPProcessor(geoCfg, defaultResourceAttributes, providers).processLogs, processorhelper.WithCapabilities(processorCapabilities)) + return processorhelper.NewLogsProcessor(ctx, set, cfg, nextConsumer, newGeoIPProcessor(geoCfg, defaultResourceAttributes, providers, set).processLogs, processorhelper.WithCapabilities(processorCapabilities)) } diff --git a/processor/geoipprocessor/geoip_processor.go b/processor/geoipprocessor/geoip_processor.go index f358cfabcaf8..c78d112c0725 100644 --- a/processor/geoipprocessor/geoip_processor.go +++ b/processor/geoipprocessor/geoip_processor.go @@ -10,7 +10,9 @@ import ( "net" "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/otel/attribute" + "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/geoipprocessor/internal/provider" ) @@ -26,15 +28,17 @@ var ( type geoIPProcessor struct { providers []provider.GeoIPProvider resourceAttributes []attribute.Key + logger *zap.Logger cfg *Config } -func newGeoIPProcessor(processorConfig *Config, resourceAttributes []attribute.Key, providers []provider.GeoIPProvider) *geoIPProcessor { +func newGeoIPProcessor(processorConfig *Config, resourceAttributes []attribute.Key, providers []provider.GeoIPProvider, params processor.Settings) *geoIPProcessor { return &geoIPProcessor{ resourceAttributes: resourceAttributes, providers: providers, cfg: processorConfig, + logger: params.Logger, } } @@ -70,9 +74,14 @@ func ipFromAttributes(attributes []attribute.Key, resource pcommon.Map) (net.IP, // It returns a set of attributes containing the geolocation data, or an error if the location could not be determined. func (g *geoIPProcessor) geoLocation(ctx context.Context, ip net.IP) (attribute.Set, error) { allAttributes := &attribute.Set{} - for _, provider := range g.providers { - geoAttributes, err := provider.Location(ctx, ip) + for _, geoProvider := range g.providers { + geoAttributes, err := geoProvider.Location(ctx, ip) if err != nil { + // continue if no metadata is found + if errors.Is(err, provider.ErrNoMetadataFound) { + g.logger.Debug(err.Error(), zap.String("IP", ip.String())) + continue + } return attribute.Set{}, err } *allAttributes = attribute.NewSet(append(allAttributes.ToSlice(), geoAttributes.ToSlice()...)...) diff --git a/processor/geoipprocessor/geoip_processor_test.go b/processor/geoipprocessor/geoip_processor_test.go index 32969f69917b..e4daf1ab236a 100644 --- a/processor/geoipprocessor/geoip_processor_test.go +++ b/processor/geoipprocessor/geoip_processor_test.go @@ -99,6 +99,12 @@ var testCases = []struct { context: resource, lookupAttributes: defaultResourceAttributes, }, + { + name: "default source.address attribute no geo metadata found by providers", + goldenDir: "source_address_geo_not_found", + context: resource, + lookupAttributes: defaultResourceAttributes, + }, { name: "default source.ip attribute with an unspecified IP address should be skipped", goldenDir: "unspecified_address", @@ -196,21 +202,24 @@ func TestProcessor(t *testing.T) { return &baseProviderMock, nil } - baseProviderMock.LocationF = func(context.Context, net.IP) (attribute.Set, error) { - return attribute.NewSet([]attribute.KeyValue{ - semconv.SourceAddress("1.2.3.4"), - attribute.String(conventions.AttributeGeoCityName, "Boxford"), - attribute.String(conventions.AttributeGeoContinentCode, "EU"), - attribute.String(conventions.AttributeGeoContinentName, "Europe"), - attribute.String(conventions.AttributeGeoCountryIsoCode, "GB"), - attribute.String(conventions.AttributeGeoCountryName, "United Kingdom"), - attribute.String(conventions.AttributeGeoTimezone, "Europe/London"), - attribute.String(conventions.AttributeGeoRegionIsoCode, "WBK"), - attribute.String(conventions.AttributeGeoRegionName, "West Berkshire"), - attribute.String(conventions.AttributeGeoPostalCode, "OX1"), - attribute.Float64(conventions.AttributeGeoLocationLat, 1234), - attribute.Float64(conventions.AttributeGeoLocationLon, 5678), - }...), nil + baseProviderMock.LocationF = func(_ context.Context, sourceIP net.IP) (attribute.Set, error) { + if sourceIP.Equal(net.IPv4(1, 2, 3, 4)) { + return attribute.NewSet([]attribute.KeyValue{ + semconv.SourceAddress("1.2.3.4"), + attribute.String(conventions.AttributeGeoCityName, "Boxford"), + attribute.String(conventions.AttributeGeoContinentCode, "EU"), + attribute.String(conventions.AttributeGeoContinentName, "Europe"), + attribute.String(conventions.AttributeGeoCountryIsoCode, "GB"), + attribute.String(conventions.AttributeGeoCountryName, "United Kingdom"), + attribute.String(conventions.AttributeGeoTimezone, "Europe/London"), + attribute.String(conventions.AttributeGeoRegionIsoCode, "WBK"), + attribute.String(conventions.AttributeGeoRegionName, "West Berkshire"), + attribute.String(conventions.AttributeGeoPostalCode, "OX1"), + attribute.Float64(conventions.AttributeGeoLocationLat, 1234), + attribute.Float64(conventions.AttributeGeoLocationLon, 5678), + }...), nil + } + return attribute.Set{}, provider.ErrNoMetadataFound } const providerKey string = "mock" providerFactories[providerKey] = &baseMockFactory diff --git a/processor/geoipprocessor/go.mod b/processor/geoipprocessor/go.mod index 5e32b0313f45..9266f6e1fe7e 100644 --- a/processor/geoipprocessor/go.mod +++ b/processor/geoipprocessor/go.mod @@ -17,6 +17,7 @@ require ( go.opentelemetry.io/collector/processor v0.110.0 go.opentelemetry.io/otel v1.30.0 go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.27.0 ) require go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect @@ -108,7 +109,6 @@ require ( go.opentelemetry.io/otel/trace v1.30.0 // indirect go.opentelemetry.io/proto/otlp v1.3.1 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.27.0 // indirect go4.org/netipx v0.0.0-20230824141953-6213f710f925 // indirect golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/net v0.29.0 // indirect diff --git a/processor/geoipprocessor/internal/provider/geoipprovider.go b/processor/geoipprocessor/internal/provider/geoipprovider.go index 2e29ac48112b..e0d5cb41f0d5 100644 --- a/processor/geoipprocessor/internal/provider/geoipprovider.go +++ b/processor/geoipprocessor/internal/provider/geoipprovider.go @@ -5,6 +5,7 @@ package provider // import "github.com/open-telemetry/opentelemetry-collector-co import ( "context" + "errors" "net" "go.opentelemetry.io/collector/component" @@ -12,6 +13,9 @@ import ( "go.opentelemetry.io/otel/attribute" ) +// ErrNoMetadataFound error should be returned when a provider could not find the corresponding IP metadata +var ErrNoMetadataFound = errors.New("no geo IP metadata found") + // Config is the configuration of a GeoIPProvider. type Config interface { component.ConfigValidator diff --git a/processor/geoipprocessor/internal/provider/maxmindprovider/factory_test.go b/processor/geoipprocessor/internal/provider/maxmindprovider/factory_test.go index a70bd4bc4267..fcc6fa48d18c 100644 --- a/processor/geoipprocessor/internal/provider/maxmindprovider/factory_test.go +++ b/processor/geoipprocessor/internal/provider/maxmindprovider/factory_test.go @@ -25,6 +25,6 @@ func TestCreateProvider(t *testing.T) { provider, err := factory.CreateGeoIPProvider(context.Background(), processortest.NewNopSettings(), cfg) - assert.Contains(t, err.Error(), "could not open geoip database") + assert.ErrorContains(t, err, "could not open geoip database") assert.Nil(t, provider) } diff --git a/processor/geoipprocessor/internal/provider/maxmindprovider/provider.go b/processor/geoipprocessor/internal/provider/maxmindprovider/provider.go index 2a301549f38d..f56b02fe4de0 100644 --- a/processor/geoipprocessor/internal/provider/maxmindprovider/provider.go +++ b/processor/geoipprocessor/internal/provider/maxmindprovider/provider.go @@ -22,8 +22,7 @@ var ( geoIP2CityDBType = "GeoIP2-City" geoLite2CityDBType = "GeoLite2-City" - errUnsupportedDB = errors.New("unsupported geo IP database type") - errNoMetadataFound = errors.New("no geo IP metadata found") + errUnsupportedDB = errors.New("unsupported geo IP database type") ) type maxMindProvider struct { @@ -51,7 +50,7 @@ func (g *maxMindProvider) Location(_ context.Context, ipAddress net.IP) (attribu if err != nil { return attribute.Set{}, err } else if len(*attrs) == 0 { - return attribute.Set{}, errNoMetadataFound + return attribute.Set{}, provider.ErrNoMetadataFound } return attribute.NewSet(*attrs...), nil default: diff --git a/processor/geoipprocessor/testdata/source_address_geo_not_found/input-logs.yaml b/processor/geoipprocessor/testdata/source_address_geo_not_found/input-logs.yaml new file mode 100644 index 000000000000..b0bcc78ae503 --- /dev/null +++ b/processor/geoipprocessor/testdata/source_address_geo_not_found/input-logs.yaml @@ -0,0 +1,23 @@ +resourceLogs: + - resource: + attributes: + - key: source.address + value: + stringValue: 1.2.3.5 + - key: ip + value: + stringValue: 1.2.2.1 + scopeLogs: + - logRecords: + - attributes: + - key: host.name + value: + stringValue: HOST.ONE + - key: log.file.name + value: + stringValue: one.log + body: + stringValue: hello one + spanId: "" + traceId: "" + scope: {} diff --git a/processor/geoipprocessor/testdata/source_address_geo_not_found/input-metrics.yaml b/processor/geoipprocessor/testdata/source_address_geo_not_found/input-metrics.yaml new file mode 100644 index 000000000000..956bdd3eef0a --- /dev/null +++ b/processor/geoipprocessor/testdata/source_address_geo_not_found/input-metrics.yaml @@ -0,0 +1,63 @@ +resourceMetrics: + - resource: + attributes: + - key: ip + value: + stringValue: 1.2.2.1 + - key: source.address + value: + stringValue: 1.2.3.5 + schemaUrl: https://test-res-schema.com/schema + scopeMetrics: + - metrics: + - description: This also isn't a real metric + name: storage.amplitude + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "0" + attributes: + - key: a + value: + stringValue: AAAA + isMonotonic: false + unit: "1" + - name: delta.histogram.test + histogram: + aggregationTemporality: 1 + dataPoints: + - explicitBounds: [0.01, 0.1, 1, 10, 100] + bucketCounts: [9, 12, 17, 8, 34] + attributes: + - key: aaa + value: + stringValue: bbb + - name: summary.test + summary: + dataPoints: + - quantileValues: + - quantile: 0.25 + value: 50 + - quantile: 0.5 + value: 20 + - quantile: 0.75 + value: 75 + - quantile: 0.95 + value: 10 + - gauge: + dataPoints: + - asDouble: 345 + attributes: + - key: aaa + value: + stringValue: bbb + timeUnixNano: "1000000" + name: test.gauge + schemaUrl: https://test-scope-schema.com/schema + scope: + attributes: + - key: foo + value: + stringValue: bar + name: MyTestInstrument + version: 1.2.3 diff --git a/processor/geoipprocessor/testdata/source_address_geo_not_found/input-traces.yaml b/processor/geoipprocessor/testdata/source_address_geo_not_found/input-traces.yaml new file mode 100644 index 000000000000..de031b30164f --- /dev/null +++ b/processor/geoipprocessor/testdata/source_address_geo_not_found/input-traces.yaml @@ -0,0 +1,39 @@ +resourceSpans: + - resource: + attributes: + - key: source.address + value: + stringValue: 1.2.3.5 + - key: ip + value: + stringValue: 1.2.2.1 + scopeSpans: + - scope: {} + spans: + - attributes: + - key: http.request.method + value: + stringValue: POST + - key: url.full + value: + stringValue: https://www.foo.bar/search?q=OpenTelemetry#SemConv + - key: http.response.status_code + value: + intValue: "201" + endTimeUnixNano: "1581452773000000789" + events: + - attributes: + - key: event.attr1 + value: + stringValue: foo2 + - key: event.attr2 + value: + stringValue: bar2 + name: event2 + timeUnixNano: "1581452773000000123" + name: span-elastic-http + parentSpanId: bcff497b5a47310f + spanId: "" + startTimeUnixNano: "1581452772000000321" + status: {} + traceId: "" diff --git a/processor/geoipprocessor/testdata/source_address_geo_not_found/output-logs.yaml b/processor/geoipprocessor/testdata/source_address_geo_not_found/output-logs.yaml new file mode 100644 index 000000000000..b0bcc78ae503 --- /dev/null +++ b/processor/geoipprocessor/testdata/source_address_geo_not_found/output-logs.yaml @@ -0,0 +1,23 @@ +resourceLogs: + - resource: + attributes: + - key: source.address + value: + stringValue: 1.2.3.5 + - key: ip + value: + stringValue: 1.2.2.1 + scopeLogs: + - logRecords: + - attributes: + - key: host.name + value: + stringValue: HOST.ONE + - key: log.file.name + value: + stringValue: one.log + body: + stringValue: hello one + spanId: "" + traceId: "" + scope: {} diff --git a/processor/geoipprocessor/testdata/source_address_geo_not_found/output-metrics.yaml b/processor/geoipprocessor/testdata/source_address_geo_not_found/output-metrics.yaml new file mode 100644 index 000000000000..01f02c7c61d7 --- /dev/null +++ b/processor/geoipprocessor/testdata/source_address_geo_not_found/output-metrics.yaml @@ -0,0 +1,72 @@ +resourceMetrics: + - resource: + attributes: + - key: ip + value: + stringValue: 1.2.2.1 + - key: source.address + value: + stringValue: 1.2.3.5 + schemaUrl: https://test-res-schema.com/schema + scopeMetrics: + - metrics: + - description: This also isn't a real metric + name: storage.amplitude + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "0" + attributes: + - key: a + value: + stringValue: AAAA + unit: "1" + - histogram: + aggregationTemporality: 1 + dataPoints: + - attributes: + - key: aaa + value: + stringValue: bbb + bucketCounts: + - "9" + - "12" + - "17" + - "8" + - "34" + explicitBounds: + - 0.01 + - 0.1 + - 1 + - 10 + - 100 + name: delta.histogram.test + - name: summary.test + summary: + dataPoints: + - quantileValues: + - quantile: 0.25 + value: 50 + - quantile: 0.5 + value: 20 + - quantile: 0.75 + value: 75 + - quantile: 0.95 + value: 10 + - gauge: + dataPoints: + - asDouble: 345 + attributes: + - key: aaa + value: + stringValue: bbb + timeUnixNano: "1000000" + name: test.gauge + schemaUrl: https://test-scope-schema.com/schema + scope: + attributes: + - key: foo + value: + stringValue: bar + name: MyTestInstrument + version: 1.2.3 diff --git a/processor/geoipprocessor/testdata/source_address_geo_not_found/output-traces.yaml b/processor/geoipprocessor/testdata/source_address_geo_not_found/output-traces.yaml new file mode 100644 index 000000000000..de031b30164f --- /dev/null +++ b/processor/geoipprocessor/testdata/source_address_geo_not_found/output-traces.yaml @@ -0,0 +1,39 @@ +resourceSpans: + - resource: + attributes: + - key: source.address + value: + stringValue: 1.2.3.5 + - key: ip + value: + stringValue: 1.2.2.1 + scopeSpans: + - scope: {} + spans: + - attributes: + - key: http.request.method + value: + stringValue: POST + - key: url.full + value: + stringValue: https://www.foo.bar/search?q=OpenTelemetry#SemConv + - key: http.response.status_code + value: + intValue: "201" + endTimeUnixNano: "1581452773000000789" + events: + - attributes: + - key: event.attr1 + value: + stringValue: foo2 + - key: event.attr2 + value: + stringValue: bar2 + name: event2 + timeUnixNano: "1581452773000000123" + name: span-elastic-http + parentSpanId: bcff497b5a47310f + spanId: "" + startTimeUnixNano: "1581452772000000321" + status: {} + traceId: "" diff --git a/processor/metricsgenerationprocessor/README.md b/processor/metricsgenerationprocessor/README.md index 3d81bcad46f7..42498a5ca312 100644 --- a/processor/metricsgenerationprocessor/README.md +++ b/processor/metricsgenerationprocessor/README.md @@ -16,12 +16,14 @@ ## Description -The metrics generation processor (`experimental_metricsgenerationprocessor`) can be used to create new metrics using existing metrics following a given rule. Currently it supports following two approaches for creating a new metric. +The metrics generation processor (`experimental_metricsgenerationprocessor`) can be used to create new metrics using existing metrics following a given rule. This processor currently supports the following two approaches for creating a new metric. -1. It can create a new metric from two existing metrics by applying one of the following arithmetic operations: add, subtract, multiply, divide and percent. One use case is to calculate the `pod.memory.utilization` metric like the following equation- +1. It can create a new metric from two existing metrics by applying one of the following arithmetic operations: add, subtract, multiply, divide, or percent. One use case is to calculate the `pod.memory.utilization` metric like the following equation- `pod.memory.utilization` = (`pod.memory.usage.bytes` / `node.memory.limit`) 1. It can create a new metric by scaling the value of an existing metric with a given constant number. One use case is to convert `pod.memory.usage` metric values from Megabytes to Bytes (multiply the existing metric's value by 1,048,576) +Note: The created metric's type is inherited from the metric configured as `metric1`. + ## Configuration Configuration is specified through a list of generation rules. Generation rules find the metrics which @@ -43,10 +45,10 @@ processors: # type describes how the new metric will be generated. It can be one of `calculate` or `scale`. calculate generates a metric applying the given operation on two operand metrics. scale operates only on operand1 metric to generate the new metric. type: {calculate, scale} - # This is a required field. + # This is a required field. This must be a gauge or sum metric. metric1: - # This field is required only if the type is "calculate". + # This field is required only if the type is "calculate". When required, this must be a gauge or sum metric. metric2: # Operation specifies which arithmetic operation to apply. It must be one of the five supported operations. diff --git a/processor/metricsgenerationprocessor/go.mod b/processor/metricsgenerationprocessor/go.mod index 5e7e10e33aa9..d1c2e84f8d5f 100644 --- a/processor/metricsgenerationprocessor/go.mod +++ b/processor/metricsgenerationprocessor/go.mod @@ -3,6 +3,8 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/processor/metri go 1.22.0 require ( + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.110.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.110.0 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.110.0 go.opentelemetry.io/collector/confmap v1.16.0 @@ -15,6 +17,7 @@ require ( ) require ( + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -29,6 +32,7 @@ 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/pkg/pdatautil v0.110.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect go.opentelemetry.io/collector/component/componentstatus v0.110.0 // indirect @@ -59,3 +63,9 @@ retract ( v0.76.1 v0.65.0 ) + +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden => ../../pkg/golden + +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest => ../../pkg/pdatatest + +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil => ../../pkg/pdatautil diff --git a/processor/metricsgenerationprocessor/go.sum b/processor/metricsgenerationprocessor/go.sum index e195251f7c4d..12d9a3eacfd4 100644 --- a/processor/metricsgenerationprocessor/go.sum +++ b/processor/metricsgenerationprocessor/go.sum @@ -1,3 +1,5 @@ +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/processor/metricsgenerationprocessor/processor.go b/processor/metricsgenerationprocessor/processor.go index e7aa1f6dc764..a058533af1e1 100644 --- a/processor/metricsgenerationprocessor/processor.go +++ b/processor/metricsgenerationprocessor/processor.go @@ -61,9 +61,6 @@ func (mgp *metricsGenerationProcessor) processMetrics(_ context.Context, md pmet continue } operand2 = getMetricValue(metric2) - if operand2 <= 0 { - continue - } } else if rule.ruleType == string(scale) { operand2 = rule.scaleBy diff --git a/processor/metricsgenerationprocessor/processor_test.go b/processor/metricsgenerationprocessor/processor_test.go index 49cd25058abe..fe60a8d70186 100644 --- a/processor/metricsgenerationprocessor/processor_test.go +++ b/processor/metricsgenerationprocessor/processor_test.go @@ -5,15 +5,21 @@ package metricsgenerationprocessor import ( "context" + "fmt" + "path/filepath" "testing" "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/processor/processortest" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest/pmetrictest" ) type testMetric struct { @@ -384,3 +390,132 @@ func getOutputForIntGaugeTest() pmetric.Metrics { return intGaugeOutputMetrics } + +type goldenTestCases struct { + name string + testDir string +} + +func TestGoldenFileMetrics(t *testing.T) { + // Test description by test data directory: + // input_metric_types: These tests are to ensure calculations can be done on both sums and gauges + // result_metric_types: These tests are to ensure the created metric's type is correct + // metric2_zero_value: These tests are to ensure metrics are created properly when the second metric's (metric2) + // value is 0. + testCaseNames := []goldenTestCases{ + { + name: "sum_gauge_metric", + testDir: "input_metric_types", + }, + { + name: "add_sum_sum", + testDir: "result_metric_types", + }, + { + name: "add_gauge_gauge", + testDir: "result_metric_types", + }, + { + name: "add_gauge_sum", + testDir: "result_metric_types", + }, + { + name: "add_sum_gauge", + testDir: "result_metric_types", + }, + { + name: "multiply_gauge_sum", + testDir: "result_metric_types", + }, + { + name: "multiply_sum_gauge", + testDir: "result_metric_types", + }, + { + name: "divide_gauge_sum", + testDir: "result_metric_types", + }, + { + name: "divide_sum_gauge", + testDir: "result_metric_types", + }, + { + name: "subtract_gauge_sum", + testDir: "result_metric_types", + }, + { + name: "subtract_sum_gauge", + testDir: "result_metric_types", + }, + { + name: "percent_sum_gauge", + testDir: "result_metric_types", + }, + { + name: "percent_gauge_sum", + testDir: "result_metric_types", + }, + { + name: "metric2_zero_add", + testDir: "metric2_zero_value", + }, + { + name: "metric2_zero_subtract", + testDir: "metric2_zero_value", + }, + { + name: "metric2_zero_multiply", + testDir: "metric2_zero_value", + }, + { + name: "metric2_zero_divide", + testDir: "metric2_zero_value", + }, + { + name: "metric2_zero_percent", + testDir: "metric2_zero_value", + }, + } + + for _, testCase := range testCaseNames { + cm, err := confmaptest.LoadConf(filepath.Join("testdata", testCase.testDir, "config.yaml")) + assert.NoError(t, err) + + next := new(consumertest.MetricsSink) + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + + sub, err := cm.Sub(fmt.Sprintf("%s/%s", "experimental_metricsgeneration", testCase.name)) + require.NoError(t, err) + require.NoError(t, sub.Unmarshal(cfg)) + + mgp, err := factory.CreateMetricsProcessor( + context.Background(), + processortest.NewNopSettings(), + cfg, + next, + ) + assert.NotNil(t, mgp) + assert.NoError(t, err) + + assert.True(t, mgp.Capabilities().MutatesData) + require.NoError(t, mgp.Start(context.Background(), nil)) + + inputMetrics, err := golden.ReadMetrics(filepath.Join("testdata", testCase.testDir, "metrics_input.yaml")) + assert.NoError(t, err) + + err = mgp.ConsumeMetrics(context.Background(), inputMetrics) + assert.NoError(t, err) + + got := next.AllMetrics() + // golden.WriteMetrics(t, filepath.Join("testdata", testCase.testDir, fmt.Sprintf("%s_%s", testCase.name, "expected.yaml")), got[0]) + expected, err := golden.ReadMetrics(filepath.Join("testdata", testCase.testDir, fmt.Sprintf("%s_%s", testCase.name, "expected.yaml"))) + assert.NoError(t, err) + assert.Len(t, got, 1) + err = pmetrictest.CompareMetrics(expected, got[0], + pmetrictest.IgnoreMetricDataPointsOrder(), + pmetrictest.IgnoreStartTimestamp(), + pmetrictest.IgnoreTimestamp()) + assert.NoError(t, err) + } +} diff --git a/processor/metricsgenerationprocessor/testdata/input_metric_types/config.yaml b/processor/metricsgenerationprocessor/testdata/input_metric_types/config.yaml new file mode 100644 index 000000000000..fad7d6fda678 --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/input_metric_types/config.yaml @@ -0,0 +1,8 @@ +experimental_metricsgeneration/sum_gauge_metric: + rules: + - name: system.filesystem.capacity + unit: bytes + type: calculate + metric1: system.filesystem.usage + metric2: system.filesystem.utilization + operation: divide diff --git a/processor/metricsgenerationprocessor/testdata/input_metric_types/metrics_input.yaml b/processor/metricsgenerationprocessor/testdata/input_metric_types/metrics_input.yaml new file mode 100644 index 000000000000..6e4fee3c6c5c --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/input_metric_types/metrics_input.yaml @@ -0,0 +1,802 @@ +resourceMetrics: + - resource: {} + scopeMetrics: + - scope: + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper + version: 0.110.0-dev + metrics: + - name: system.filesystem.inodes.usage + description: FileSystem inodes used. + unit: "{inodes}" + sum: + dataPoints: + - attributes: + - key: device + value: + stringValue: "/dev/disk1s4s1" + - key: mode + value: + stringValue: ro + - key: mountpoint + value: + stringValue: "/" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: used + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '404475' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s4s1" + - key: mode + value: + stringValue: ro + - key: mountpoint + value: + stringValue: "/" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: free + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '2183953600' + - attributes: + - key: device + value: + stringValue: devfs + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/dev" + - key: type + value: + stringValue: devfs + - key: state + value: + stringValue: used + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '666' + - attributes: + - key: device + value: + stringValue: devfs + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/dev" + - key: type + value: + stringValue: devfs + - key: state + value: + stringValue: free + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '0' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s2" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Preboot" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: used + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '1813' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s2" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Preboot" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: free + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '2183953600' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s6" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/VM" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: used + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '4' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s6" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/VM" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: free + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '2183953600' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s5" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Update" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: used + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '24' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s5" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Update" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: free + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '2183953600' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s1" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Data" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: used + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '4770142' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s1" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Data" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: free + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '2183953600' + - attributes: + - key: device + value: + stringValue: map auto_home + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Data/home" + - key: type + value: + stringValue: autofs + - key: state + value: + stringValue: used + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '0' + - attributes: + - key: device + value: + stringValue: map auto_home + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Data/home" + - key: type + value: + stringValue: autofs + - key: state + value: + stringValue: free + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '0' + aggregationTemporality: 2 + - name: system.filesystem.usage + description: Filesystem bytes used. + unit: By + sum: + dataPoints: + - attributes: + - key: device + value: + stringValue: "/dev/disk1s4s1" + - key: mode + value: + stringValue: ro + - key: mountpoint + value: + stringValue: "/" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: used + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '276326326272' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s4s1" + - key: mode + value: + stringValue: ro + - key: mountpoint + value: + stringValue: "/" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: free + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '223636848640' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s4s1" + - key: mode + value: + stringValue: ro + - key: mountpoint + value: + stringValue: "/" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: reserved + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '0' + - attributes: + - key: device + value: + stringValue: devfs + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/dev" + - key: type + value: + stringValue: devfs + - key: state + value: + stringValue: used + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '197120' + - attributes: + - key: device + value: + stringValue: devfs + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/dev" + - key: type + value: + stringValue: devfs + - key: state + value: + stringValue: free + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '0' + - attributes: + - key: device + value: + stringValue: devfs + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/dev" + - key: type + value: + stringValue: devfs + - key: state + value: + stringValue: reserved + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '0' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s2" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Preboot" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: used + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '276326326272' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s2" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Preboot" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: free + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '223636848640' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s2" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Preboot" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: reserved + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '0' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s6" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/VM" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: used + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '276326326272' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s6" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/VM" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: free + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '223636848640' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s6" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/VM" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: reserved + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '0' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s5" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Update" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: used + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '276326326272' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s5" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Update" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: free + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '223636848640' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s5" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Update" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: reserved + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '0' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s1" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Data" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: used + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '276326326272' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s1" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Data" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: free + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '223636848640' + - attributes: + - key: device + value: + stringValue: "/dev/disk1s1" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Data" + - key: type + value: + stringValue: apfs + - key: state + value: + stringValue: reserved + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '0' + - attributes: + - key: device + value: + stringValue: map auto_home + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Data/home" + - key: type + value: + stringValue: autofs + - key: state + value: + stringValue: used + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '0' + - attributes: + - key: device + value: + stringValue: map auto_home + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Data/home" + - key: type + value: + stringValue: autofs + - key: state + value: + stringValue: free + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '0' + - attributes: + - key: device + value: + stringValue: map auto_home + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Data/home" + - key: type + value: + stringValue: autofs + - key: state + value: + stringValue: reserved + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asInt: '0' + aggregationTemporality: 2 + - name: system.filesystem.utilization + description: Fraction of filesystem bytes used. + unit: '1' + gauge: + dataPoints: + - attributes: + - key: device + value: + stringValue: "/dev/disk1s4s1" + - key: mode + value: + stringValue: ro + - key: mountpoint + value: + stringValue: "/" + - key: type + value: + stringValue: apfs + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asDouble: 0.5526933585071281 + - attributes: + - key: device + value: + stringValue: devfs + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/dev" + - key: type + value: + stringValue: devfs + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asDouble: 1 + - attributes: + - key: device + value: + stringValue: "/dev/disk1s2" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Preboot" + - key: type + value: + stringValue: apfs + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asDouble: 0.5526933585071281 + - attributes: + - key: device + value: + stringValue: "/dev/disk1s6" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/VM" + - key: type + value: + stringValue: apfs + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asDouble: 0.5526933585071281 + - attributes: + - key: device + value: + stringValue: "/dev/disk1s5" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Update" + - key: type + value: + stringValue: apfs + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asDouble: 0.5526933585071281 + - attributes: + - key: device + value: + stringValue: "/dev/disk1s1" + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Data" + - key: type + value: + stringValue: apfs + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asDouble: 0.5526933585071281 + - attributes: + - key: device + value: + stringValue: map auto_home + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: "/System/Volumes/Data/home" + - key: type + value: + stringValue: autofs + startTimeUnixNano: '1726497870000000000' + timeUnixNano: '1727303734559741000' + asDouble: 0 + schemaUrl: https://opentelemetry.io/schemas/1.9.0 diff --git a/processor/metricsgenerationprocessor/testdata/input_metric_types/sum_gauge_metric_expected.yaml b/processor/metricsgenerationprocessor/testdata/input_metric_types/sum_gauge_metric_expected.yaml new file mode 100644 index 000000000000..b2ac2ec86563 --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/input_metric_types/sum_gauge_metric_expected.yaml @@ -0,0 +1,1205 @@ +resourceMetrics: + - resource: {} + schemaUrl: https://opentelemetry.io/schemas/1.9.0 + scopeMetrics: + - metrics: + - description: FileSystem inodes used. + name: system.filesystem.inodes.usage + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "2183953600" + attributes: + - key: device + value: + stringValue: /dev/disk1s1 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Data + - key: state + value: + stringValue: free + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "4770142" + attributes: + - key: device + value: + stringValue: /dev/disk1s1 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Data + - key: state + value: + stringValue: used + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "2183953600" + attributes: + - key: device + value: + stringValue: /dev/disk1s2 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Preboot + - key: state + value: + stringValue: free + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "1813" + attributes: + - key: device + value: + stringValue: /dev/disk1s2 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Preboot + - key: state + value: + stringValue: used + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "2183953600" + attributes: + - key: device + value: + stringValue: /dev/disk1s4s1 + - key: mode + value: + stringValue: ro + - key: mountpoint + value: + stringValue: / + - key: state + value: + stringValue: free + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "404475" + attributes: + - key: device + value: + stringValue: /dev/disk1s4s1 + - key: mode + value: + stringValue: ro + - key: mountpoint + value: + stringValue: / + - key: state + value: + stringValue: used + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "2183953600" + attributes: + - key: device + value: + stringValue: /dev/disk1s5 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Update + - key: state + value: + stringValue: free + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "24" + attributes: + - key: device + value: + stringValue: /dev/disk1s5 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Update + - key: state + value: + stringValue: used + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "2183953600" + attributes: + - key: device + value: + stringValue: /dev/disk1s6 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/VM + - key: state + value: + stringValue: free + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "4" + attributes: + - key: device + value: + stringValue: /dev/disk1s6 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/VM + - key: state + value: + stringValue: used + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "0" + attributes: + - key: device + value: + stringValue: devfs + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /dev + - key: state + value: + stringValue: free + - key: type + value: + stringValue: devfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "666" + attributes: + - key: device + value: + stringValue: devfs + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /dev + - key: state + value: + stringValue: used + - key: type + value: + stringValue: devfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "0" + attributes: + - key: device + value: + stringValue: map auto_home + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Data/home + - key: state + value: + stringValue: free + - key: type + value: + stringValue: autofs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "0" + attributes: + - key: device + value: + stringValue: map auto_home + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Data/home + - key: state + value: + stringValue: used + - key: type + value: + stringValue: autofs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: '{inodes}' + - description: Filesystem bytes used. + name: system.filesystem.usage + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "223636848640" + attributes: + - key: device + value: + stringValue: /dev/disk1s1 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Data + - key: state + value: + stringValue: free + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "0" + attributes: + - key: device + value: + stringValue: /dev/disk1s1 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Data + - key: state + value: + stringValue: reserved + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "276326326272" + attributes: + - key: device + value: + stringValue: /dev/disk1s1 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Data + - key: state + value: + stringValue: used + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "223636848640" + attributes: + - key: device + value: + stringValue: /dev/disk1s2 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Preboot + - key: state + value: + stringValue: free + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "0" + attributes: + - key: device + value: + stringValue: /dev/disk1s2 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Preboot + - key: state + value: + stringValue: reserved + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "276326326272" + attributes: + - key: device + value: + stringValue: /dev/disk1s2 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Preboot + - key: state + value: + stringValue: used + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "223636848640" + attributes: + - key: device + value: + stringValue: /dev/disk1s4s1 + - key: mode + value: + stringValue: ro + - key: mountpoint + value: + stringValue: / + - key: state + value: + stringValue: free + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "0" + attributes: + - key: device + value: + stringValue: /dev/disk1s4s1 + - key: mode + value: + stringValue: ro + - key: mountpoint + value: + stringValue: / + - key: state + value: + stringValue: reserved + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "276326326272" + attributes: + - key: device + value: + stringValue: /dev/disk1s4s1 + - key: mode + value: + stringValue: ro + - key: mountpoint + value: + stringValue: / + - key: state + value: + stringValue: used + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "223636848640" + attributes: + - key: device + value: + stringValue: /dev/disk1s5 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Update + - key: state + value: + stringValue: free + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "0" + attributes: + - key: device + value: + stringValue: /dev/disk1s5 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Update + - key: state + value: + stringValue: reserved + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "276326326272" + attributes: + - key: device + value: + stringValue: /dev/disk1s5 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Update + - key: state + value: + stringValue: used + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "223636848640" + attributes: + - key: device + value: + stringValue: /dev/disk1s6 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/VM + - key: state + value: + stringValue: free + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "0" + attributes: + - key: device + value: + stringValue: /dev/disk1s6 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/VM + - key: state + value: + stringValue: reserved + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "276326326272" + attributes: + - key: device + value: + stringValue: /dev/disk1s6 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/VM + - key: state + value: + stringValue: used + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "0" + attributes: + - key: device + value: + stringValue: devfs + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /dev + - key: state + value: + stringValue: free + - key: type + value: + stringValue: devfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "0" + attributes: + - key: device + value: + stringValue: devfs + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /dev + - key: state + value: + stringValue: reserved + - key: type + value: + stringValue: devfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "197120" + attributes: + - key: device + value: + stringValue: devfs + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /dev + - key: state + value: + stringValue: used + - key: type + value: + stringValue: devfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "0" + attributes: + - key: device + value: + stringValue: map auto_home + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Data/home + - key: state + value: + stringValue: free + - key: type + value: + stringValue: autofs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "0" + attributes: + - key: device + value: + stringValue: map auto_home + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Data/home + - key: state + value: + stringValue: reserved + - key: type + value: + stringValue: autofs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asInt: "0" + attributes: + - key: device + value: + stringValue: map auto_home + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Data/home + - key: state + value: + stringValue: used + - key: type + value: + stringValue: autofs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: By + - description: Fraction of filesystem bytes used. + gauge: + dataPoints: + - asDouble: 0.5526933585071281 + attributes: + - key: device + value: + stringValue: /dev/disk1s1 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Data + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.5526933585071281 + attributes: + - key: device + value: + stringValue: /dev/disk1s2 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Preboot + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.5526933585071281 + attributes: + - key: device + value: + stringValue: /dev/disk1s4s1 + - key: mode + value: + stringValue: ro + - key: mountpoint + value: + stringValue: / + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.5526933585071281 + attributes: + - key: device + value: + stringValue: /dev/disk1s5 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Update + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0.5526933585071281 + attributes: + - key: device + value: + stringValue: /dev/disk1s6 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/VM + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 1 + attributes: + - key: device + value: + stringValue: devfs + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /dev + - key: type + value: + stringValue: devfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0 + attributes: + - key: device + value: + stringValue: map auto_home + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Data/home + - key: type + value: + stringValue: autofs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: system.filesystem.utilization + unit: "1" + - name: system.filesystem.capacity + sum: + dataPoints: + - asDouble: 4.046309679639759e+11 + attributes: + - key: device + value: + stringValue: /dev/disk1s1 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Data + - key: state + value: + stringValue: free + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0 + attributes: + - key: device + value: + stringValue: /dev/disk1s1 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Data + - key: state + value: + stringValue: reserved + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 4.99963174912e+11 + attributes: + - key: device + value: + stringValue: /dev/disk1s1 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Data + - key: state + value: + stringValue: used + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 4.046309679639759e+11 + attributes: + - key: device + value: + stringValue: /dev/disk1s2 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Preboot + - key: state + value: + stringValue: free + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0 + attributes: + - key: device + value: + stringValue: /dev/disk1s2 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Preboot + - key: state + value: + stringValue: reserved + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 4.99963174912e+11 + attributes: + - key: device + value: + stringValue: /dev/disk1s2 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Preboot + - key: state + value: + stringValue: used + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 4.046309679639759e+11 + attributes: + - key: device + value: + stringValue: /dev/disk1s4s1 + - key: mode + value: + stringValue: ro + - key: mountpoint + value: + stringValue: / + - key: state + value: + stringValue: free + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0 + attributes: + - key: device + value: + stringValue: /dev/disk1s4s1 + - key: mode + value: + stringValue: ro + - key: mountpoint + value: + stringValue: / + - key: state + value: + stringValue: reserved + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 4.99963174912e+11 + attributes: + - key: device + value: + stringValue: /dev/disk1s4s1 + - key: mode + value: + stringValue: ro + - key: mountpoint + value: + stringValue: / + - key: state + value: + stringValue: used + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 4.046309679639759e+11 + attributes: + - key: device + value: + stringValue: /dev/disk1s5 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Update + - key: state + value: + stringValue: free + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0 + attributes: + - key: device + value: + stringValue: /dev/disk1s5 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Update + - key: state + value: + stringValue: reserved + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 4.99963174912e+11 + attributes: + - key: device + value: + stringValue: /dev/disk1s5 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Update + - key: state + value: + stringValue: used + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 4.046309679639759e+11 + attributes: + - key: device + value: + stringValue: /dev/disk1s6 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/VM + - key: state + value: + stringValue: free + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0 + attributes: + - key: device + value: + stringValue: /dev/disk1s6 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/VM + - key: state + value: + stringValue: reserved + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 4.99963174912e+11 + attributes: + - key: device + value: + stringValue: /dev/disk1s6 + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/VM + - key: state + value: + stringValue: used + - key: type + value: + stringValue: apfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0 + attributes: + - key: device + value: + stringValue: devfs + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /dev + - key: state + value: + stringValue: free + - key: type + value: + stringValue: devfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0 + attributes: + - key: device + value: + stringValue: devfs + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /dev + - key: state + value: + stringValue: reserved + - key: type + value: + stringValue: devfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 356653.46247770725 + attributes: + - key: device + value: + stringValue: devfs + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /dev + - key: state + value: + stringValue: used + - key: type + value: + stringValue: devfs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0 + attributes: + - key: device + value: + stringValue: map auto_home + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Data/home + - key: state + value: + stringValue: free + - key: type + value: + stringValue: autofs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0 + attributes: + - key: device + value: + stringValue: map auto_home + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Data/home + - key: state + value: + stringValue: reserved + - key: type + value: + stringValue: autofs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + - asDouble: 0 + attributes: + - key: device + value: + stringValue: map auto_home + - key: mode + value: + stringValue: rw + - key: mountpoint + value: + stringValue: /System/Volumes/Data/home + - key: state + value: + stringValue: used + - key: type + value: + stringValue: autofs + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: bytes + scope: + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper + version: 0.110.0-dev diff --git a/processor/metricsgenerationprocessor/testdata/metric2_zero_value/config.yaml b/processor/metricsgenerationprocessor/testdata/metric2_zero_value/config.yaml new file mode 100644 index 000000000000..af80af4f110a --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/metric2_zero_value/config.yaml @@ -0,0 +1,30 @@ +experimental_metricsgeneration/metric2_zero_add: + rules: + - name: new_metric + metric1: capacity.total + metric2: capacity.used + operation: add +experimental_metricsgeneration/metric2_zero_subtract: + rules: + - name: new_metric + metric1: capacity.total + metric2: capacity.used + operation: subtract +experimental_metricsgeneration/metric2_zero_multiply: + rules: + - name: new_metric + metric1: capacity.total + metric2: capacity.used + operation: multiply +experimental_metricsgeneration/metric2_zero_divide: + rules: + - name: new_metric + metric1: capacity.total + metric2: capacity.used + operation: divide +experimental_metricsgeneration/metric2_zero_percent: + rules: + - name: new_metric + metric1: capacity.total + metric2: capacity.used + operation: percent diff --git a/processor/metricsgenerationprocessor/testdata/metric2_zero_value/metric2_zero_add_expected.yaml b/processor/metricsgenerationprocessor/testdata/metric2_zero_value/metric2_zero_add_expected.yaml new file mode 100644 index 000000000000..c08fa9e7f797 --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/metric2_zero_value/metric2_zero_add_expected.yaml @@ -0,0 +1,31 @@ +resourceMetrics: + - resource: {} + schemaUrl: https://opentelemetry.io/schemas/1.9.0 + scopeMetrics: + - metrics: + - description: total capacity + name: capacity.total + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "50" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: By + - description: used capacity + gauge: + dataPoints: + - asInt: "0" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: capacity.used + unit: By + - name: new_metric + sum: + dataPoints: + - asDouble: 50 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + scope: + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper + version: latest diff --git a/processor/metricsgenerationprocessor/testdata/metric2_zero_value/metric2_zero_divide_expected.yaml b/processor/metricsgenerationprocessor/testdata/metric2_zero_value/metric2_zero_divide_expected.yaml new file mode 100644 index 000000000000..a83b8b117f04 --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/metric2_zero_value/metric2_zero_divide_expected.yaml @@ -0,0 +1,25 @@ +resourceMetrics: + - resource: {} + schemaUrl: https://opentelemetry.io/schemas/1.9.0 + scopeMetrics: + - metrics: + - description: total capacity + name: capacity.total + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "50" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: By + - description: used capacity + gauge: + dataPoints: + - asInt: "0" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: capacity.used + unit: By + scope: + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper + version: latest diff --git a/processor/metricsgenerationprocessor/testdata/metric2_zero_value/metric2_zero_multiply_expected.yaml b/processor/metricsgenerationprocessor/testdata/metric2_zero_value/metric2_zero_multiply_expected.yaml new file mode 100644 index 000000000000..961298afef62 --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/metric2_zero_value/metric2_zero_multiply_expected.yaml @@ -0,0 +1,31 @@ +resourceMetrics: + - resource: {} + schemaUrl: https://opentelemetry.io/schemas/1.9.0 + scopeMetrics: + - metrics: + - description: total capacity + name: capacity.total + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "50" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: By + - description: used capacity + gauge: + dataPoints: + - asInt: "0" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: capacity.used + unit: By + - name: new_metric + sum: + dataPoints: + - asDouble: 0 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + scope: + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper + version: latest diff --git a/processor/metricsgenerationprocessor/testdata/metric2_zero_value/metric2_zero_percent_expected.yaml b/processor/metricsgenerationprocessor/testdata/metric2_zero_value/metric2_zero_percent_expected.yaml new file mode 100644 index 000000000000..a83b8b117f04 --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/metric2_zero_value/metric2_zero_percent_expected.yaml @@ -0,0 +1,25 @@ +resourceMetrics: + - resource: {} + schemaUrl: https://opentelemetry.io/schemas/1.9.0 + scopeMetrics: + - metrics: + - description: total capacity + name: capacity.total + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "50" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: By + - description: used capacity + gauge: + dataPoints: + - asInt: "0" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: capacity.used + unit: By + scope: + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper + version: latest diff --git a/processor/metricsgenerationprocessor/testdata/metric2_zero_value/metric2_zero_subtract_expected.yaml b/processor/metricsgenerationprocessor/testdata/metric2_zero_value/metric2_zero_subtract_expected.yaml new file mode 100644 index 000000000000..c08fa9e7f797 --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/metric2_zero_value/metric2_zero_subtract_expected.yaml @@ -0,0 +1,31 @@ +resourceMetrics: + - resource: {} + schemaUrl: https://opentelemetry.io/schemas/1.9.0 + scopeMetrics: + - metrics: + - description: total capacity + name: capacity.total + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "50" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: By + - description: used capacity + gauge: + dataPoints: + - asInt: "0" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: capacity.used + unit: By + - name: new_metric + sum: + dataPoints: + - asDouble: 50 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + scope: + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper + version: latest diff --git a/processor/metricsgenerationprocessor/testdata/metric2_zero_value/metrics_input.yaml b/processor/metricsgenerationprocessor/testdata/metric2_zero_value/metrics_input.yaml new file mode 100644 index 000000000000..b36dd663ab5c --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/metric2_zero_value/metrics_input.yaml @@ -0,0 +1,26 @@ +resourceMetrics: + - resource: {} + schemaUrl: https://opentelemetry.io/schemas/1.9.0 + scopeMetrics: + - metrics: + - description: total capacity + name: capacity.total + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "50" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: By + - description: used capacity + name: capacity.used + gauge: + aggregationTemporality: 2 + dataPoints: + - asInt: "0" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: By + scope: + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper + version: latest diff --git a/processor/metricsgenerationprocessor/testdata/result_metric_types/add_gauge_gauge_expected.yaml b/processor/metricsgenerationprocessor/testdata/result_metric_types/add_gauge_gauge_expected.yaml new file mode 100644 index 000000000000..9bfcbb8c0c9f --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/result_metric_types/add_gauge_gauge_expected.yaml @@ -0,0 +1,32 @@ +resourceMetrics: + - resource: {} + schemaUrl: https://opentelemetry.io/schemas/1.9.0 + scopeMetrics: + - metrics: + - description: foo + name: sum + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "1000" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: By + - description: bar + gauge: + dataPoints: + - asDouble: 50 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: gauge + unit: "1" + - gauge: + dataPoints: + - asDouble: 100 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: new_metric + unit: percent + scope: + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper + version: latest diff --git a/processor/metricsgenerationprocessor/testdata/result_metric_types/add_gauge_sum_expected.yaml b/processor/metricsgenerationprocessor/testdata/result_metric_types/add_gauge_sum_expected.yaml new file mode 100644 index 000000000000..ee7c710d0414 --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/result_metric_types/add_gauge_sum_expected.yaml @@ -0,0 +1,32 @@ +resourceMetrics: + - resource: {} + schemaUrl: https://opentelemetry.io/schemas/1.9.0 + scopeMetrics: + - metrics: + - description: foo + name: sum + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "1000" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: By + - description: bar + gauge: + dataPoints: + - asDouble: 50 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: gauge + unit: "1" + - gauge: + dataPoints: + - asDouble: 1050 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: new_metric + unit: percent + scope: + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper + version: latest diff --git a/processor/metricsgenerationprocessor/testdata/result_metric_types/add_sum_gauge_expected.yaml b/processor/metricsgenerationprocessor/testdata/result_metric_types/add_sum_gauge_expected.yaml new file mode 100644 index 000000000000..1769886855bb --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/result_metric_types/add_sum_gauge_expected.yaml @@ -0,0 +1,32 @@ +resourceMetrics: + - resource: {} + schemaUrl: https://opentelemetry.io/schemas/1.9.0 + scopeMetrics: + - metrics: + - description: foo + name: sum + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "1000" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: By + - description: bar + gauge: + dataPoints: + - asDouble: 50 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: gauge + unit: "1" + - name: new_metric + sum: + dataPoints: + - asDouble: 1050 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: percent + scope: + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper + version: latest diff --git a/processor/metricsgenerationprocessor/testdata/result_metric_types/add_sum_sum_expected.yaml b/processor/metricsgenerationprocessor/testdata/result_metric_types/add_sum_sum_expected.yaml new file mode 100644 index 000000000000..a198c0c8a435 --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/result_metric_types/add_sum_sum_expected.yaml @@ -0,0 +1,32 @@ +resourceMetrics: + - resource: {} + schemaUrl: https://opentelemetry.io/schemas/1.9.0 + scopeMetrics: + - metrics: + - description: foo + name: sum + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "1000" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: By + - description: bar + gauge: + dataPoints: + - asDouble: 50 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: gauge + unit: "1" + - name: new_metric + sum: + dataPoints: + - asDouble: 2000 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: percent + scope: + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper + version: latest diff --git a/processor/metricsgenerationprocessor/testdata/result_metric_types/config.yaml b/processor/metricsgenerationprocessor/testdata/result_metric_types/config.yaml new file mode 100644 index 000000000000..9af299c78caa --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/result_metric_types/config.yaml @@ -0,0 +1,96 @@ +experimental_metricsgeneration/add_sum_sum: + rules: + - name: new_metric + unit: percent + type: calculate + metric1: sum + metric2: sum + operation: add +experimental_metricsgeneration/add_gauge_gauge: + rules: + - name: new_metric + unit: percent + type: calculate + metric1: gauge + metric2: gauge + operation: add +experimental_metricsgeneration/add_gauge_sum: + rules: + - name: new_metric + unit: percent + type: calculate + metric1: gauge + metric2: sum + operation: add +experimental_metricsgeneration/add_sum_gauge: + rules: + - name: new_metric + unit: percent + type: calculate + metric1: sum + metric2: gauge + operation: add +experimental_metricsgeneration/multiply_gauge_sum: + rules: + - name: new_metric + unit: percent + type: calculate + metric1: gauge + metric2: sum + operation: multiply +experimental_metricsgeneration/multiply_sum_gauge: + rules: + - name: new_metric + unit: percent + type: calculate + metric1: sum + metric2: gauge + operation: multiply +experimental_metricsgeneration/divide_gauge_sum: + rules: + - name: new_metric + unit: percent + type: calculate + metric1: gauge + metric2: sum + operation: multiply +experimental_metricsgeneration/divide_sum_gauge: + rules: + - name: new_metric + unit: percent + type: calculate + metric1: sum + metric2: gauge + operation: divide +experimental_metricsgeneration/subtract_gauge_sum: + rules: + - name: new_metric + unit: percent + type: calculate + metric1: gauge + metric2: sum + operation: subtract +experimental_metricsgeneration/subtract_sum_gauge: + rules: + - name: new_metric + unit: percent + type: calculate + metric1: sum + metric2: gauge + operation: subtract +experimental_metricsgeneration/percent_gauge_sum: + rules: + - name: new_metric + unit: percent + type: calculate + metric1: gauge + metric2: sum + operation: percent +experimental_metricsgeneration/percent_sum_gauge: + rules: + - name: new_metric + unit: percent + type: calculate + metric1: sum + metric2: gauge + operation: percent \ No newline at end of file diff --git a/processor/metricsgenerationprocessor/testdata/result_metric_types/divide_gauge_sum_expected.yaml b/processor/metricsgenerationprocessor/testdata/result_metric_types/divide_gauge_sum_expected.yaml new file mode 100644 index 000000000000..dc7a2f34c64c --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/result_metric_types/divide_gauge_sum_expected.yaml @@ -0,0 +1,32 @@ +resourceMetrics: + - resource: {} + schemaUrl: https://opentelemetry.io/schemas/1.9.0 + scopeMetrics: + - metrics: + - description: foo + name: sum + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "1000" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: By + - description: bar + gauge: + dataPoints: + - asDouble: 50 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: gauge + unit: "1" + - gauge: + dataPoints: + - asDouble: 50000 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: new_metric + unit: percent + scope: + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper + version: latest diff --git a/processor/metricsgenerationprocessor/testdata/result_metric_types/divide_sum_gauge_expected.yaml b/processor/metricsgenerationprocessor/testdata/result_metric_types/divide_sum_gauge_expected.yaml new file mode 100644 index 000000000000..1aea52d63388 --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/result_metric_types/divide_sum_gauge_expected.yaml @@ -0,0 +1,32 @@ +resourceMetrics: + - resource: {} + schemaUrl: https://opentelemetry.io/schemas/1.9.0 + scopeMetrics: + - metrics: + - description: foo + name: sum + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "1000" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: By + - description: bar + gauge: + dataPoints: + - asDouble: 50 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: gauge + unit: "1" + - name: new_metric + sum: + dataPoints: + - asDouble: 20 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: percent + scope: + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper + version: latest diff --git a/processor/metricsgenerationprocessor/testdata/result_metric_types/metrics_input.yaml b/processor/metricsgenerationprocessor/testdata/result_metric_types/metrics_input.yaml new file mode 100644 index 000000000000..cc63a8a46ead --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/result_metric_types/metrics_input.yaml @@ -0,0 +1,25 @@ +resourceMetrics: + - resource: {} + schemaUrl: https://opentelemetry.io/schemas/1.9.0 + scopeMetrics: + - metrics: + - description: foo + name: sum + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "1000" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: By + - description: bar + gauge: + dataPoints: + - asDouble: "50" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: gauge + unit: "1" + scope: + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper + version: latest diff --git a/processor/metricsgenerationprocessor/testdata/result_metric_types/multiply_gauge_sum_expected.yaml b/processor/metricsgenerationprocessor/testdata/result_metric_types/multiply_gauge_sum_expected.yaml new file mode 100644 index 000000000000..dc7a2f34c64c --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/result_metric_types/multiply_gauge_sum_expected.yaml @@ -0,0 +1,32 @@ +resourceMetrics: + - resource: {} + schemaUrl: https://opentelemetry.io/schemas/1.9.0 + scopeMetrics: + - metrics: + - description: foo + name: sum + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "1000" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: By + - description: bar + gauge: + dataPoints: + - asDouble: 50 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: gauge + unit: "1" + - gauge: + dataPoints: + - asDouble: 50000 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: new_metric + unit: percent + scope: + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper + version: latest diff --git a/processor/metricsgenerationprocessor/testdata/result_metric_types/multiply_sum_gauge_expected.yaml b/processor/metricsgenerationprocessor/testdata/result_metric_types/multiply_sum_gauge_expected.yaml new file mode 100644 index 000000000000..1e6a0afba6c0 --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/result_metric_types/multiply_sum_gauge_expected.yaml @@ -0,0 +1,32 @@ +resourceMetrics: + - resource: {} + schemaUrl: https://opentelemetry.io/schemas/1.9.0 + scopeMetrics: + - metrics: + - description: foo + name: sum + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "1000" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: By + - description: bar + gauge: + dataPoints: + - asDouble: 50 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: gauge + unit: "1" + - name: new_metric + sum: + dataPoints: + - asDouble: 50000 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: percent + scope: + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper + version: latest diff --git a/processor/metricsgenerationprocessor/testdata/result_metric_types/percent_gauge_sum_expected.yaml b/processor/metricsgenerationprocessor/testdata/result_metric_types/percent_gauge_sum_expected.yaml new file mode 100644 index 000000000000..345f5a96576b --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/result_metric_types/percent_gauge_sum_expected.yaml @@ -0,0 +1,32 @@ +resourceMetrics: + - resource: {} + schemaUrl: https://opentelemetry.io/schemas/1.9.0 + scopeMetrics: + - metrics: + - description: foo + name: sum + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "1000" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: By + - description: bar + gauge: + dataPoints: + - asDouble: 50 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: gauge + unit: "1" + - gauge: + dataPoints: + - asDouble: 5 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: new_metric + unit: percent + scope: + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper + version: latest diff --git a/processor/metricsgenerationprocessor/testdata/result_metric_types/percent_sum_gauge_expected.yaml b/processor/metricsgenerationprocessor/testdata/result_metric_types/percent_sum_gauge_expected.yaml new file mode 100644 index 000000000000..a198c0c8a435 --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/result_metric_types/percent_sum_gauge_expected.yaml @@ -0,0 +1,32 @@ +resourceMetrics: + - resource: {} + schemaUrl: https://opentelemetry.io/schemas/1.9.0 + scopeMetrics: + - metrics: + - description: foo + name: sum + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "1000" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: By + - description: bar + gauge: + dataPoints: + - asDouble: 50 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: gauge + unit: "1" + - name: new_metric + sum: + dataPoints: + - asDouble: 2000 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: percent + scope: + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper + version: latest diff --git a/processor/metricsgenerationprocessor/testdata/result_metric_types/subtract_gauge_sum_expected.yaml b/processor/metricsgenerationprocessor/testdata/result_metric_types/subtract_gauge_sum_expected.yaml new file mode 100644 index 000000000000..d2ab7b52109f --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/result_metric_types/subtract_gauge_sum_expected.yaml @@ -0,0 +1,32 @@ +resourceMetrics: + - resource: {} + schemaUrl: https://opentelemetry.io/schemas/1.9.0 + scopeMetrics: + - metrics: + - description: foo + name: sum + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "1000" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: By + - description: bar + gauge: + dataPoints: + - asDouble: 50 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: gauge + unit: "1" + - gauge: + dataPoints: + - asDouble: -950 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: new_metric + unit: percent + scope: + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper + version: latest diff --git a/processor/metricsgenerationprocessor/testdata/result_metric_types/subtract_sum_gauge_expected.yaml b/processor/metricsgenerationprocessor/testdata/result_metric_types/subtract_sum_gauge_expected.yaml new file mode 100644 index 000000000000..190498b748f5 --- /dev/null +++ b/processor/metricsgenerationprocessor/testdata/result_metric_types/subtract_sum_gauge_expected.yaml @@ -0,0 +1,32 @@ +resourceMetrics: + - resource: {} + schemaUrl: https://opentelemetry.io/schemas/1.9.0 + scopeMetrics: + - metrics: + - description: foo + name: sum + sum: + aggregationTemporality: 2 + dataPoints: + - asInt: "1000" + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: By + - description: bar + gauge: + dataPoints: + - asDouble: 50 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + name: gauge + unit: "1" + - name: new_metric + sum: + dataPoints: + - asDouble: 950 + startTimeUnixNano: "1000000" + timeUnixNano: "2000000" + unit: percent + scope: + name: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper + version: latest diff --git a/processor/metricsgenerationprocessor/utils.go b/processor/metricsgenerationprocessor/utils.go index af613fdb0992..a47f98f223c8 100644 --- a/processor/metricsgenerationprocessor/utils.go +++ b/processor/metricsgenerationprocessor/utils.go @@ -4,6 +4,8 @@ package metricsgenerationprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricsgenerationprocessor" import ( + "fmt" + "go.opentelemetry.io/collector/pdata/pmetric" "go.uber.org/zap" ) @@ -25,24 +27,31 @@ func getNameToMetricMap(rm pmetric.ResourceMetrics) map[string]pmetric.Metric { // getMetricValue returns the value of the first data point from the given metric. func getMetricValue(metric pmetric.Metric) float64 { - if metric.Type() == pmetric.MetricTypeGauge { - dataPoints := metric.Gauge().DataPoints() - if dataPoints.Len() > 0 { - switch dataPoints.At(0).ValueType() { - case pmetric.NumberDataPointValueTypeDouble: - return dataPoints.At(0).DoubleValue() - case pmetric.NumberDataPointValueTypeInt: - return float64(dataPoints.At(0).IntValue()) - } - } + var dataPoints pmetric.NumberDataPointSlice + + switch metricType := metric.Type(); metricType { + case pmetric.MetricTypeGauge: + dataPoints = metric.Gauge().DataPoints() + case pmetric.MetricTypeSum: + dataPoints = metric.Sum().DataPoints() + default: return 0 } + + if dataPoints.Len() > 0 { + switch dataPoints.At(0).ValueType() { + case pmetric.NumberDataPointValueTypeDouble: + return dataPoints.At(0).DoubleValue() + case pmetric.NumberDataPointValueTypeInt: + return float64(dataPoints.At(0).IntValue()) + } + } + return 0 } // generateMetrics creates a new metric based on the given rule and add it to the Resource Metric. -// The value for newly calculated metrics is always a floting point number and the dataType is set -// as MetricTypeDoubleGauge. +// The value for newly calculated metrics is always a floating point number. func generateMetrics(rm pmetric.ResourceMetrics, operand2 float64, rule internalRule, logger *zap.Logger) { ilms := rm.ScopeMetrics() for i := 0; i < ilms.Len(); i++ { @@ -51,16 +60,41 @@ func generateMetrics(rm pmetric.ResourceMetrics, operand2 float64, rule internal for j := 0; j < metricSlice.Len(); j++ { metric := metricSlice.At(j) if metric.Name() == rule.metric1 { - newMetric := appendMetric(ilm, rule.name, rule.unit) - newMetric.SetEmptyGauge() - addDoubleGaugeDataPoints(metric, newMetric, operand2, rule.operation, logger) + newMetric := generateMetric(metric, operand2, rule.operation, logger) + + dataPointCount := 0 + switch newMetric.Type() { + case pmetric.MetricTypeSum: + dataPointCount = newMetric.Sum().DataPoints().Len() + case pmetric.MetricTypeGauge: + dataPointCount = newMetric.Gauge().DataPoints().Len() + } + + // Only create a new metric if valid data points were calculated successfully + if dataPointCount > 0 { + appendMetric(ilm, newMetric, rule.name, rule.unit) + } } } } } -func addDoubleGaugeDataPoints(from pmetric.Metric, to pmetric.Metric, operand2 float64, operation string, logger *zap.Logger) { - dataPoints := from.Gauge().DataPoints() +func generateMetric(from pmetric.Metric, operand2 float64, operation string, logger *zap.Logger) pmetric.Metric { + var dataPoints pmetric.NumberDataPointSlice + to := pmetric.NewMetric() + + switch metricType := from.Type(); metricType { + case pmetric.MetricTypeGauge: + to.SetEmptyGauge() + dataPoints = from.Gauge().DataPoints() + case pmetric.MetricTypeSum: + to.SetEmptySum() + dataPoints = from.Sum().DataPoints() + default: + logger.Debug(fmt.Sprintf("Calculations are only supported on gauge or sum metric types. Given metric '%s' is of type `%s`", from.Name(), metricType.String())) + return pmetric.NewMetric() + } + for i := 0; i < dataPoints.Len(); i++ { fromDataPoint := dataPoints.At(i) var operand1 float64 @@ -70,42 +104,58 @@ func addDoubleGaugeDataPoints(from pmetric.Metric, to pmetric.Metric, operand2 f case pmetric.NumberDataPointValueTypeInt: operand1 = float64(fromDataPoint.IntValue()) } + value, err := calculateValue(operand1, operand2, operation, to.Name()) - neweDoubleDataPoint := to.Gauge().DataPoints().AppendEmpty() - fromDataPoint.CopyTo(neweDoubleDataPoint) - value := calculateValue(operand1, operand2, operation, logger, to.Name()) - neweDoubleDataPoint.SetDoubleValue(value) + // Only add a new data point if it was a valid operation + if err != nil { + logger.Debug(err.Error()) + } else { + var newDoubleDataPoint pmetric.NumberDataPoint + switch to.Type() { + case pmetric.MetricTypeGauge: + newDoubleDataPoint = to.Gauge().DataPoints().AppendEmpty() + case pmetric.MetricTypeSum: + newDoubleDataPoint = to.Sum().DataPoints().AppendEmpty() + } + + fromDataPoint.CopyTo(newDoubleDataPoint) + newDoubleDataPoint.SetDoubleValue(value) + } } + + return to } -func appendMetric(ilm pmetric.ScopeMetrics, name, unit string) pmetric.Metric { +// Append the scope metrics with the new metric +func appendMetric(ilm pmetric.ScopeMetrics, newMetric pmetric.Metric, name, unit string) pmetric.Metric { metric := ilm.Metrics().AppendEmpty() - metric.SetName(name) + newMetric.MoveTo(metric) + metric.SetUnit(unit) + metric.SetName(name) return metric } -func calculateValue(operand1 float64, operand2 float64, operation string, logger *zap.Logger, metricName string) float64 { +func calculateValue(operand1 float64, operand2 float64, operation string, metricName string) (float64, error) { switch operation { case string(add): - return operand1 + operand2 + return operand1 + operand2, nil case string(subtract): - return operand1 - operand2 + return operand1 - operand2, nil case string(multiply): - return operand1 * operand2 + return operand1 * operand2, nil case string(divide): if operand2 == 0 { - logger.Debug("Divide by zero was attempted while calculating metric", zap.String("metric_name", metricName)) - return 0 + return 0, fmt.Errorf("Divide by zero was attempted while calculating metric: %s", metricName) } - return operand1 / operand2 + return operand1 / operand2, nil case string(percent): if operand2 == 0 { - logger.Debug("Divide by zero was attempted while calculating metric", zap.String("metric_name", metricName)) - return 0 + return 0, fmt.Errorf("Divide by zero was attempted while calculating metric: %s", metricName) } - return (operand1 / operand2) * 100 + return (operand1 / operand2) * 100, nil + default: + return 0, fmt.Errorf("Invalid operation option was specified: %s", operation) } - return 0 } diff --git a/processor/metricsgenerationprocessor/utils_test.go b/processor/metricsgenerationprocessor/utils_test.go index 5558ba36210f..2f5fa9b78422 100644 --- a/processor/metricsgenerationprocessor/utils_test.go +++ b/processor/metricsgenerationprocessor/utils_test.go @@ -8,32 +8,39 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/pdata/pmetric" - "go.uber.org/zap" ) func TestCalculateValue(t *testing.T) { - value := calculateValue(100.0, 5.0, "add", zap.NewNop(), "test_metric") + value, err := calculateValue(100.0, 5.0, "add", "test_metric") + require.NoError(t, err) require.Equal(t, 105.0, value) - value = calculateValue(100.0, 5.0, "subtract", zap.NewNop(), "test_metric") + value, err = calculateValue(100.0, 5.0, "subtract", "test_metric") + require.NoError(t, err) require.Equal(t, 95.0, value) - value = calculateValue(100.0, 5.0, "multiply", zap.NewNop(), "test_metric") + value, err = calculateValue(100.0, 5.0, "multiply", "test_metric") + require.NoError(t, err) require.Equal(t, 500.0, value) - value = calculateValue(100.0, 5.0, "divide", zap.NewNop(), "test_metric") + value, err = calculateValue(100.0, 5.0, "divide", "test_metric") + require.NoError(t, err) require.Equal(t, 20.0, value) - value = calculateValue(10.0, 200.0, "percent", zap.NewNop(), "test_metric") + value, err = calculateValue(10.0, 200.0, "percent", "test_metric") + require.NoError(t, err) require.Equal(t, 5.0, value) - value = calculateValue(100.0, 0, "divide", zap.NewNop(), "test_metric") + value, err = calculateValue(100.0, 0, "divide", "test_metric") + require.Error(t, err) require.Equal(t, 0.0, value) - value = calculateValue(100.0, 0, "percent", zap.NewNop(), "test_metric") + value, err = calculateValue(100.0, 0, "percent", "test_metric") + require.Error(t, err) require.Equal(t, 0.0, value) - value = calculateValue(100.0, 0, "invalid", zap.NewNop(), "test_metric") + value, err = calculateValue(100.0, 0, "invalid", "test_metric") + require.Error(t, err) require.Equal(t, 0.0, value) } diff --git a/processor/resourcedetectionprocessor/go.mod b/processor/resourcedetectionprocessor/go.mod index 54a879db0077..398a94854a37 100644 --- a/processor/resourcedetectionprocessor/go.mod +++ b/processor/resourcedetectionprocessor/go.mod @@ -12,7 +12,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.110.0 - github.com/shirou/gopsutil/v4 v4.24.8 + github.com/shirou/gopsutil/v4 v4.24.9 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.110.0 go.opentelemetry.io/collector/config/confighttp v0.110.0 @@ -42,6 +42,7 @@ require ( github.com/docker/docker v26.1.5+incompatible // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect + github.com/ebitengine/purego v0.8.0 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/fatih/color v1.16.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect @@ -98,7 +99,6 @@ require ( github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/rs/cors v1.11.1 // indirect - github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.2 // indirect diff --git a/processor/resourcedetectionprocessor/go.sum b/processor/resourcedetectionprocessor/go.sum index c2994124dc8c..f8597900aac0 100644 --- a/processor/resourcedetectionprocessor/go.sum +++ b/processor/resourcedetectionprocessor/go.sum @@ -87,6 +87,8 @@ github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6 github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/ebitengine/purego v0.8.0 h1:JbqvnEzRvPpxhCJzJJ2y0RbiZ8nyjccVUrSM3q+GvvE= +github.com/ebitengine/purego v0.8.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= @@ -413,12 +415,8 @@ github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/shirou/gopsutil/v4 v4.24.8 h1:pVQjIenQkIhqO81mwTaXjTzOMT7d3TZkf43PlVFHENI= -github.com/shirou/gopsutil/v4 v4.24.8/go.mod h1:wE0OrJtj4dG+hYkxqDH3QiBICdKSf04/npcvLLc/oRg= -github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= -github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= -github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= -github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= +github.com/shirou/gopsutil/v4 v4.24.9 h1:KIV+/HaHD5ka5f570RZq+2SaeFsb/pq+fp2DGNWYoOI= +github.com/shirou/gopsutil/v4 v4.24.9/go.mod h1:3fkaHNeYsUFCGZ8+9vZVWtbyM1k2eRnlL+bWO8Bxa/Q= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= diff --git a/processor/routingprocessor/go.mod b/processor/routingprocessor/go.mod index 473b62e5eec2..fa2f0d330626 100644 --- a/processor/routingprocessor/go.mod +++ b/processor/routingprocessor/go.mod @@ -24,7 +24,7 @@ require ( go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 ) require ( diff --git a/processor/routingprocessor/go.sum b/processor/routingprocessor/go.sum index ff3fa4bc353a..10d06edbe578 100644 --- a/processor/routingprocessor/go.sum +++ b/processor/routingprocessor/go.sum @@ -227,8 +227,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/receiver/activedirectorydsreceiver/scraper_test.go b/receiver/activedirectorydsreceiver/scraper_test.go index aca02e6aa5a3..041ab3abd4ef 100644 --- a/receiver/activedirectorydsreceiver/scraper_test.go +++ b/receiver/activedirectorydsreceiver/scraper_test.go @@ -73,8 +73,8 @@ func TestScrape(t *testing.T) { scrapeData, err := scraper.scrape(context.Background()) require.Error(t, err) require.True(t, scrapererror.IsPartialScrapeError(err)) - require.Contains(t, err.Error(), fullSyncObjectsRemainingErr.Error()) - require.Contains(t, err.Error(), draInboundValuesDNErr.Error()) + require.ErrorContains(t, err, fullSyncObjectsRemainingErr.Error()) + require.ErrorContains(t, err, draInboundValuesDNErr.Error()) expectedMetrics, err := golden.ReadMetrics(partialScrapePath) require.NoError(t, err) @@ -106,9 +106,8 @@ func TestScrape(t *testing.T) { } err = scraper.shutdown(context.Background()) - require.Error(t, err) - require.Contains(t, err.Error(), fullSyncObjectsRemainingErr.Error()) - require.Contains(t, err.Error(), draInboundValuesDNErr.Error()) + require.ErrorContains(t, err, fullSyncObjectsRemainingErr.Error()) + require.ErrorContains(t, err, draInboundValuesDNErr.Error()) }) t.Run("Double shutdown does not error", func(t *testing.T) { diff --git a/receiver/apachesparkreceiver/client_test.go b/receiver/apachesparkreceiver/client_test.go index cd0a1f1665d7..956bccc8f4d0 100644 --- a/receiver/apachesparkreceiver/client_test.go +++ b/receiver/apachesparkreceiver/client_test.go @@ -55,7 +55,7 @@ func TestNewApacheSparkClient(t *testing.T) { ac, err := newApacheSparkClient(context.Background(), tc.cfg, tc.host, tc.settings) if tc.expectError != nil { require.Nil(t, ac) - require.Contains(t, err.Error(), tc.expectError.Error()) + require.ErrorContains(t, err, tc.expectError.Error()) } else { require.NoError(t, err) diff --git a/receiver/awscontainerinsightreceiver/go.mod b/receiver/awscontainerinsightreceiver/go.mod index b751926380a3..87d1e74040f1 100644 --- a/receiver/awscontainerinsightreceiver/go.mod +++ b/receiver/awscontainerinsightreceiver/go.mod @@ -11,7 +11,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.110.0 - github.com/shirou/gopsutil/v4 v4.24.8 + github.com/shirou/gopsutil/v4 v4.24.9 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.110.0 go.opentelemetry.io/collector/config/confighttp v0.110.0 @@ -44,6 +44,7 @@ require ( github.com/docker/docker v26.1.5+incompatible // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect + github.com/ebitengine/purego v0.8.0 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect github.com/euank/go-kmsg-parser v2.0.0+incompatible // indirect github.com/felixge/httpsnoop v1.0.4 // indirect @@ -101,7 +102,6 @@ require ( github.com/prometheus/common v0.59.1 // indirect github.com/rs/cors v1.11.1 // indirect github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646 // indirect - github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.5.2 // indirect diff --git a/receiver/awscontainerinsightreceiver/go.sum b/receiver/awscontainerinsightreceiver/go.sum index 40515e67bf1d..317ae4aa9332 100644 --- a/receiver/awscontainerinsightreceiver/go.sum +++ b/receiver/awscontainerinsightreceiver/go.sum @@ -79,6 +79,8 @@ github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6 github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/ebitengine/purego v0.8.0 h1:JbqvnEzRvPpxhCJzJJ2y0RbiZ8nyjccVUrSM3q+GvvE= +github.com/ebitengine/purego v0.8.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= @@ -336,12 +338,8 @@ github.com/rs/cors v1.11.1 h1:eU3gRzXLRK57F5rKMGMZURNdIG4EoAmX8k94r9wXWHA= github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646 h1:RpforrEYXWkmGwJHIGnLZ3tTWStkjVVstwzNGqxX2Ds= github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= -github.com/shirou/gopsutil/v4 v4.24.8 h1:pVQjIenQkIhqO81mwTaXjTzOMT7d3TZkf43PlVFHENI= -github.com/shirou/gopsutil/v4 v4.24.8/go.mod h1:wE0OrJtj4dG+hYkxqDH3QiBICdKSf04/npcvLLc/oRg= -github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= -github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= -github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= -github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= +github.com/shirou/gopsutil/v4 v4.24.9 h1:KIV+/HaHD5ka5f570RZq+2SaeFsb/pq+fp2DGNWYoOI= +github.com/shirou/gopsutil/v4 v4.24.9/go.mod h1:3fkaHNeYsUFCGZ8+9vZVWtbyM1k2eRnlL+bWO8Bxa/Q= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= diff --git a/receiver/awss3receiver/go.mod b/receiver/awss3receiver/go.mod index dbb428cac651..ec33a14a3620 100644 --- a/receiver/awss3receiver/go.mod +++ b/receiver/awss3receiver/go.mod @@ -3,10 +3,10 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awss3r go 1.22.0 require ( - github.com/aws/aws-sdk-go-v2 v1.30.5 - github.com/aws/aws-sdk-go-v2/config v1.27.35 - github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.20 - github.com/aws/aws-sdk-go-v2/service/s3 v1.61.3 + github.com/aws/aws-sdk-go-v2 v1.31.0 + github.com/aws/aws-sdk-go-v2/config v1.27.39 + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.25 + github.com/aws/aws-sdk-go-v2/service/s3 v1.63.3 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.110.0 go.opentelemetry.io/collector/confmap v1.16.0 @@ -22,21 +22,21 @@ require ( ) require ( - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.4 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.33 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.5 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.37 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.17 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.19 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.17 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.22.8 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.8 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.30.8 // indirect - github.com/aws/smithy-go v1.20.4 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.18 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.20 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.18 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.23.3 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.31.3 // indirect + github.com/aws/smithy-go v1.21.0 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect diff --git a/receiver/awss3receiver/go.sum b/receiver/awss3receiver/go.sum index 37af3a705fdb..ca4e0b654d44 100644 --- a/receiver/awss3receiver/go.sum +++ b/receiver/awss3receiver/go.sum @@ -1,41 +1,41 @@ -github.com/aws/aws-sdk-go-v2 v1.30.5 h1:mWSRTwQAb0aLE17dSzztCVJWI9+cRMgqebndjwDyK0g= -github.com/aws/aws-sdk-go-v2 v1.30.5/go.mod h1:CT+ZPWXbYrci8chcARI3OmI/qgd+f6WtuLOoaIA8PR0= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.4 h1:70PVAiL15/aBMh5LThwgXdSQorVr91L127ttckI9QQU= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.4/go.mod h1:/MQxMqci8tlqDH+pjmoLu1i0tbWCUP1hhyMRuFxpQCw= -github.com/aws/aws-sdk-go-v2/config v1.27.35 h1:jeFgiWYNV0vrgdZqB4kZBjYNdy0IKkwrAjr2fwpHIig= -github.com/aws/aws-sdk-go-v2/config v1.27.35/go.mod h1:qnpEvTq8ZfjrCqmJGRfWZuF+lGZ/vG8LK2K0L/TY1gQ= -github.com/aws/aws-sdk-go-v2/credentials v1.17.33 h1:lBHAQQznENv0gLHAZ73ONiTSkCtr8q3pSqWrpbBBZz0= -github.com/aws/aws-sdk-go-v2/credentials v1.17.33/go.mod h1:MBuqCUOT3ChfLuxNDGyra67eskx7ge9e3YKYBce7wpI= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13 h1:pfQ2sqNpMVK6xz2RbqLEL0GH87JOwSxPV2rzm8Zsb74= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.13/go.mod h1:NG7RXPUlqfsCLLFfi0+IpKN4sCB9D9fw/qTaSB+xRoU= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.20 h1:I41tSUE9zJlf98j1VnSN0ATyj8WnsAXexlJyUvJF0Ak= -github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.20/go.mod h1:44AcWwA15PG6ACWgOt6G9eXO4t/HdURFzXQ0FSGh45Y= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17 h1:pI7Bzt0BJtYA0N/JEC6B8fJ4RBrEMi1LBrkMdFYNSnQ= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.17/go.mod h1:Dh5zzJYMtxfIjYW+/evjQ8uj2OyR/ve2KROHGHlSFqE= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17 h1:Mqr/V5gvrhA2gvgnF42Zh5iMiQNcOYthFYwCyrnuWlc= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.17/go.mod h1:aLJpZlCmjE+V+KtN1q1uyZkfnUWpQGpbsn89XPKyzfU= +github.com/aws/aws-sdk-go-v2 v1.31.0 h1:3V05LbxTSItI5kUqNwhJrrrY1BAXxXt0sN0l72QmG5U= +github.com/aws/aws-sdk-go-v2 v1.31.0/go.mod h1:ztolYtaEUtdpf9Wftr31CJfLVjOnD/CVRkKOOYgF8hA= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.5 h1:xDAuZTn4IMm8o1LnBZvmrL8JA1io4o3YWNXgohbf20g= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.5/go.mod h1:wYSv6iDS621sEFLfKvpPE2ugjTuGlAG7iROg0hLOkfc= +github.com/aws/aws-sdk-go-v2/config v1.27.39 h1:FCylu78eTGzW1ynHcongXK9YHtoXD5AiiUqq3YfJYjU= +github.com/aws/aws-sdk-go-v2/config v1.27.39/go.mod h1:wczj2hbyskP4LjMKBEZwPRO1shXY+GsQleab+ZXT2ik= +github.com/aws/aws-sdk-go-v2/credentials v1.17.37 h1:G2aOH01yW8X373JK419THj5QVqu9vKEwxSEsGxihoW0= +github.com/aws/aws-sdk-go-v2/credentials v1.17.37/go.mod h1:0ecCjlb7htYCptRD45lXJ6aJDQac6D2NlKGpZqyTG6A= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14 h1:C/d03NAmh8C4BZXhuRNboF/DqhBkBCeDiJDcaqIT5pA= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.14/go.mod h1:7I0Ju7p9mCIdlrfS+JCgqcYD0VXz/N4yozsox+0o078= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.25 h1:HkpHeZMM39sGtMHVYG1buAg93vhj5d7F81y6G0OAbGc= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.25/go.mod h1:j3Vz04ZjaWA6kygOsZRpmWe4CyGqfqq2u3unDTU0QGA= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18 h1:kYQ3H1u0ANr9KEKlGs/jTLrBFPo8P8NaH/w7A01NeeM= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.18/go.mod h1:r506HmK5JDUh9+Mw4CfGJGSSoqIiLCndAuqXuhbv67Y= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18 h1:Z7IdFUONvTcvS7YuhtVxN99v2cCoHRXOS4mTr0B/pUc= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.18/go.mod h1:DkKMmksZVVyat+Y+r1dEOgJEfUeA7UngIHWeKsi0yNc= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.17 h1:Roo69qTpfu8OlJ2Tb7pAYVuF0CpuUMB0IYWwYP/4DZM= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.17/go.mod h1:NcWPxQzGM1USQggaTVwz6VpqMZPX1CvDJLDh6jnOCa4= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4 h1:KypMCbLPPHEmf9DgMGw51jMj77VfGPAN2Kv4cfhlfgI= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.4/go.mod h1:Vz1JQXliGcQktFTN/LN6uGppAIRoLBR2bMvIMP0gOjc= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.19 h1:FLMkfEiRjhgeDTCjjLoc3URo/TBkgeQbocA78lfkzSI= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.19/go.mod h1:Vx+GucNSsdhaxs3aZIKfSUjKVGsxN25nX2SRcdhuw08= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19 h1:rfprUlsdzgl7ZL2KlXiUAoJnI/VxfHCvDFr2QDFj6u4= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.19/go.mod h1:SCWkEdRq8/7EK60NcvvQ6NXKuTcchAD4ROAsC37VEZE= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.17 h1:u+EfGmksnJc/x5tq3A+OD7LrMbSSR/5TrKLvkdy/fhY= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.17/go.mod h1:VaMx6302JHax2vHJWgRo+5n9zvbacs3bLU/23DNQrTY= -github.com/aws/aws-sdk-go-v2/service/s3 v1.61.3 h1:O/rjUvLED2dWzrSY6wv3njBjJlH4LT2xYRnUm402ovI= -github.com/aws/aws-sdk-go-v2/service/s3 v1.61.3/go.mod h1:5FmD/Dqq57gP+XwaUnd5WFPipAuzrf0HmupX27Gvjvc= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.8 h1:JRwuL+S1Qe1owZQoxblV7ORgRf2o0SrtzDVIbaVCdQ0= -github.com/aws/aws-sdk-go-v2/service/sso v1.22.8/go.mod h1:eEygMHnTKH/3kNp9Jr1n3PdejuSNcgwLe1dWgQtO0VQ= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.8 h1:+HpGETD9463PFSj7lX5+eq7aLDs85QUIA+NBkeAsscA= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.26.8/go.mod h1:bCbAxKDqNvkHxRaIMnyVPXPo+OaPRwvmgzMxbz1VKSA= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.8 h1:bAi+4p5EKnni+jrfcAhb7iHFQ24bthOAV9t0taf3DCE= -github.com/aws/aws-sdk-go-v2/service/sts v1.30.8/go.mod h1:NXi1dIAGteSaRLqYgarlhP/Ij0cFT+qmCwiJqWh/U5o= -github.com/aws/smithy-go v1.20.4 h1:2HK1zBdPgRbjFOHlfeQZfpC4r72MOb9bZkiFwggKO+4= -github.com/aws/smithy-go v1.20.4/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.18 h1:OWYvKL53l1rbsUmW7bQyJVsYU/Ii3bbAAQIIFNbM0Tk= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.18/go.mod h1:CUx0G1v3wG6l01tUB+j7Y8kclA8NSqK4ef0YG79a4cg= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5 h1:QFASJGfT8wMXtuP3D5CRmMjARHv9ZmzFUMJznHDOY3w= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.5/go.mod h1:QdZ3OmoIjSX+8D1OPAzPxDfjXASbBMDsz9qvtyIhtik= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.20 h1:rTWjG6AvWekO2B1LHeM3ktU7MqyX9rzWQ7hgzneZW7E= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.3.20/go.mod h1:RGW2DDpVc8hu6Y6yG8G5CHVmVOAn1oV8rNKOHRJyswg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20 h1:Xbwbmk44URTiHNx6PNo0ujDE6ERlsCKJD3u1zfnzAPg= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.20/go.mod h1:oAfOFzUB14ltPZj1rWwRc3d/6OgD76R8KlvU3EqM9Fg= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.18 h1:eb+tFOIl9ZsUe2259/BKPeniKuz4/02zZFH/i4Nf8Rg= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.17.18/go.mod h1:GVCC2IJNJTmdlyEsSmofEy7EfJncP7DNnXDzRjJ5Keg= +github.com/aws/aws-sdk-go-v2/service/s3 v1.63.3 h1:3zt8qqznMuAZWDTDpcwv9Xr11M/lVj2FsRR7oYBt0OA= +github.com/aws/aws-sdk-go-v2/service/s3 v1.63.3/go.mod h1:NLTqRLe3pUNu3nTEHI6XlHLKYmc8fbHUdMxAB6+s41Q= +github.com/aws/aws-sdk-go-v2/service/sso v1.23.3 h1:rs4JCczF805+FDv2tRhZ1NU0RB2H6ryAvsWPanAr72Y= +github.com/aws/aws-sdk-go-v2/service/sso v1.23.3/go.mod h1:XRlMvmad0ZNL+75C5FYdMvbbLkd6qiqz6foR1nA1PXY= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3 h1:S7EPdMVZod8BGKQQPTBK+FcX9g7bKR7c4+HxWqHP7Vg= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.27.3/go.mod h1:FnvDM4sfa+isJ3kDXIzAB9GAwVSzFzSy97uZ3IsHo4E= +github.com/aws/aws-sdk-go-v2/service/sts v1.31.3 h1:VzudTFrDCIDakXtemR7l6Qzt2+JYsVqo2MxBPt5k8T8= +github.com/aws/aws-sdk-go-v2/service/sts v1.31.3/go.mod h1:yMWe0F+XG0DkRZK5ODZhG7BEFYhLXi2dqGsv6tX0cgI= +github.com/aws/smithy-go v1.21.0 h1:H7L8dtDRk0P1Qm6y0ji7MCYMQObJ5R9CRpyPhRUkLYA= +github.com/aws/smithy-go v1.21.0/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= diff --git a/receiver/awsxrayreceiver/internal/tracesegment/util_test.go b/receiver/awsxrayreceiver/internal/tracesegment/util_test.go index e59ee4d7ab2e..913645ced4ee 100644 --- a/receiver/awsxrayreceiver/internal/tracesegment/util_test.go +++ b/receiver/awsxrayreceiver/internal/tracesegment/util_test.go @@ -52,7 +52,7 @@ func TestSplitHeaderBodyNonJsonHeader(t *testing.T) { var errRecv *recvErr.ErrRecoverable assert.ErrorAs(t, err, &errRecv, "should return recoverable error") - assert.Contains(t, err.Error(), "invalid character 'o'") + assert.ErrorContains(t, err, "invalid character 'o'") } func TestSplitHeaderBodyEmptyBody(t *testing.T) { @@ -76,7 +76,7 @@ func TestSplitHeaderBodyInvalidJsonHeader(t *testing.T) { var errRecv *recvErr.ErrRecoverable assert.ErrorAs(t, err, &errRecv, "should return recoverable error") - assert.Contains(t, err.Error(), + assert.ErrorContains(t, err, fmt.Sprintf("invalid header %+v", Header{ Format: "json", Version: 20, diff --git a/receiver/bigipreceiver/client_test.go b/receiver/bigipreceiver/client_test.go index 9d5c12e5b0fd..7b8ec60db4d0 100644 --- a/receiver/bigipreceiver/client_test.go +++ b/receiver/bigipreceiver/client_test.go @@ -83,7 +83,7 @@ func TestNewClient(t *testing.T) { ac, err := newClient(context.Background(), tc.cfg, tc.host, tc.settings, tc.logger) if tc.expectError != nil { require.Nil(t, ac) - require.Contains(t, err.Error(), tc.expectError.Error()) + require.ErrorContains(t, err, tc.expectError.Error()) } else { require.NoError(t, err) @@ -135,7 +135,7 @@ func TestGetNewToken(t *testing.T) { tc := createTestClient(t, ts.URL) err := tc.GetNewToken(context.Background()) - require.Contains(t, err.Error(), "failed to decode response payload") + require.ErrorContains(t, err, "failed to decode response payload") hasToken := tc.HasToken() require.False(t, hasToken) }, @@ -215,7 +215,7 @@ func TestGetVirtualServers(t *testing.T) { pools, err := tc.GetPools(context.Background()) require.Nil(t, pools) - require.Contains(t, err.Error(), "failed to decode response payload") + require.ErrorContains(t, err, "failed to decode response payload") }, }, { @@ -413,7 +413,7 @@ func TestGetPools(t *testing.T) { pools, err := tc.GetPools(context.Background()) require.Nil(t, pools) - require.Contains(t, err.Error(), "failed to decode response payload") + require.ErrorContains(t, err, "failed to decode response payload") }, }, { @@ -666,7 +666,7 @@ func TestGetNodes(t *testing.T) { nodes, err := tc.GetNodes(context.Background()) require.Nil(t, nodes) - require.Contains(t, err.Error(), "failed to decode response payload") + require.ErrorContains(t, err, "failed to decode response payload") }, }, { diff --git a/receiver/cloudflarereceiver/logs_test.go b/receiver/cloudflarereceiver/logs_test.go index 696a6b5f645b..7a60461d3247 100644 --- a/receiver/cloudflarereceiver/logs_test.go +++ b/receiver/cloudflarereceiver/logs_test.go @@ -132,7 +132,7 @@ func TestPayloadToLogRecord(t *testing.T) { if tc.expectedErr != "" { require.Error(t, err) require.Nil(t, logs) - require.Contains(t, err.Error(), tc.expectedErr) + require.ErrorContains(t, err, tc.expectedErr) } else { require.NoError(t, err) require.NotNil(t, logs) diff --git a/receiver/couchdbreceiver/client_test.go b/receiver/couchdbreceiver/client_test.go index 3306e5a14501..4164f6721267 100644 --- a/receiver/couchdbreceiver/client_test.go +++ b/receiver/couchdbreceiver/client_test.go @@ -48,8 +48,7 @@ func TestNewCouchDBClient(t *testing.T) { componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings()) - require.Error(t, err) - require.Contains(t, err.Error(), "failed to create HTTP Client: ") + require.ErrorContains(t, err, "failed to create HTTP Client: ") require.Nil(t, couchdbClient) }) t.Run("no error", func(t *testing.T) { @@ -87,27 +86,24 @@ func TestGet(t *testing.T) { couchdbClient := defaultClient(t, url) result, err := couchdbClient.Get(url) - require.Error(t, err) require.Nil(t, result) - require.Contains(t, err.Error(), "invalid port ") + require.ErrorContains(t, err, "invalid port ") }) t.Run("invalid endpoint", func(t *testing.T) { url := ts.URL + "/invalid_endpoint" couchdbClient := defaultClient(t, url) result, err := couchdbClient.Get(url) - require.Error(t, err) require.Nil(t, result) - require.Contains(t, err.Error(), "404 Not Found") + require.ErrorContains(t, err, "404 Not Found") }) t.Run("invalid body", func(t *testing.T) { url := ts.URL + "/invalid_body" couchdbClient := defaultClient(t, url) result, err := couchdbClient.Get(url) - require.Error(t, err) require.Nil(t, result) - require.Contains(t, err.Error(), "failed to read response body ") + require.ErrorContains(t, err, "failed to read response body ") }) t.Run("401 Unauthorized", func(t *testing.T) { url := ts.URL + "/_node/_local/_stats/couchdb" @@ -127,8 +123,7 @@ func TestGet(t *testing.T) { result, err := couchdbClient.Get(url) require.Nil(t, result) - require.Error(t, err) - require.Contains(t, err.Error(), "401 Unauthorized") + require.ErrorContains(t, err, "401 Unauthorized") }) t.Run("no error", func(t *testing.T) { url := ts.URL + "/_node/_local/_stats/couchdb" diff --git a/receiver/datadogreceiver/README.md b/receiver/datadogreceiver/README.md index c37c99078597..32513a6d6d7a 100644 --- a/receiver/datadogreceiver/README.md +++ b/receiver/datadogreceiver/README.md @@ -3,13 +3,11 @@ | Status | | | ------------- |-----------| -| Stability | [development]: metrics | -| | [alpha]: traces | +| Stability | [alpha]: traces, metrics | | Distributions | [contrib] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Fdatadog%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Fdatadog) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Fdatadog%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Fdatadog) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@boostchicken](https://www.github.com/boostchicken), [@gouthamve](https://www.github.com/gouthamve), [@jpkrohling](https://www.github.com/jpkrohling), [@MovieStoreGuy](https://www.github.com/MovieStoreGuy) | -[development]: https://github.com/open-telemetry/opentelemetry-collector#development [alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/receiver/datadogreceiver/go.mod b/receiver/datadogreceiver/go.mod index 8b15357b668f..54a133772892 100644 --- a/receiver/datadogreceiver/go.mod +++ b/receiver/datadogreceiver/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/datado go 1.22.0 require ( - github.com/DataDog/agent-payload/v5 v5.0.132 + github.com/DataDog/agent-payload/v5 v5.0.133 github.com/DataDog/datadog-agent/pkg/obfuscate v0.57.1 github.com/DataDog/datadog-agent/pkg/proto v0.57.1 github.com/DataDog/datadog-agent/pkg/trace v0.57.1 @@ -12,7 +12,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/exp/metrics v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.110.0 github.com/stretchr/testify v1.9.0 - github.com/tinylib/msgp v1.2.1 + github.com/tinylib/msgp v1.2.2 github.com/vmihailenco/msgpack/v5 v5.4.1 go.opentelemetry.io/collector/component v0.110.0 go.opentelemetry.io/collector/component/componentstatus v0.110.0 @@ -65,7 +65,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.110.0 // indirect github.com/outcaste-io/ristretto v0.2.1 // indirect - github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 // indirect + github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect diff --git a/receiver/datadogreceiver/go.sum b/receiver/datadogreceiver/go.sum index 4834e1f6090a..83ba6dd96a8f 100644 --- a/receiver/datadogreceiver/go.sum +++ b/receiver/datadogreceiver/go.sum @@ -1,5 +1,5 @@ -github.com/DataDog/agent-payload/v5 v5.0.132 h1:F9wy+iyAgN2QmkEsOlPp3RrQ4vOb4T6k3BXhjSpELS4= -github.com/DataDog/agent-payload/v5 v5.0.132/go.mod h1:FgVQKmVdqdmZTbxIptqJC/l+xEzdiXsaAOs/vGAvWzs= +github.com/DataDog/agent-payload/v5 v5.0.133 h1:3tl5zi6NEstCXApCyJCT5LDX5uVKloAch8/W+kVmPnY= +github.com/DataDog/agent-payload/v5 v5.0.133/go.mod h1:FgVQKmVdqdmZTbxIptqJC/l+xEzdiXsaAOs/vGAvWzs= github.com/DataDog/datadog-agent/pkg/obfuscate v0.57.1 h1:jtHJ/+WW/Ccj+3kFY48d7+NwoW5KK7tHKIfuRolE6CA= github.com/DataDog/datadog-agent/pkg/obfuscate v0.57.1/go.mod h1:Po5HwoDd4FmT/EqgrE9x7Zz4LjxtGBSIuNY1C1lppBQ= github.com/DataDog/datadog-agent/pkg/proto v0.57.1 h1:RhNjD6UiUq3cdfWFe8AqVa0YoIyM6E2hanZxWasg/WY= @@ -109,8 +109,8 @@ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9G github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/outcaste-io/ristretto v0.2.1 h1:KCItuNIGJZcursqHr3ghO7fc5ddZLEHspL9UR0cQM64= github.com/outcaste-io/ristretto v0.2.1/go.mod h1:W8HywhmtlopSB1jeMg3JtdIhf+DYkLAr0VN/s4+MHac= -github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 h1:jYi87L8j62qkXzaYHAQAhEapgukhenIMZRBKTNRLHJ4= -github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= +github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c h1:dAMKvw0MlJT1GshSTtih8C2gDs04w8dReiOGXrGLNoY= +github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -145,8 +145,8 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/tinylib/msgp v1.2.1 h1:6ypy2qcCznxpP4hpORzhtXyTqrBs7cfM9MCCWY8zsmU= -github.com/tinylib/msgp v1.2.1/go.mod h1:2vIGs3lcUo8izAATNobrCHevYZC/LMsJtw4JPiYPHro= +github.com/tinylib/msgp v1.2.2 h1:iHiBE1tJQwFI740SPEPkGE8cfhNfrqOYRlH450BnC/4= +github.com/tinylib/msgp v1.2.2/go.mod h1:ykjzy2wzgrlvpDCRc4LA8UXy6D8bzMSuAF3WD57Gok0= 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/datadogreceiver/internal/metadata/generated_status.go b/receiver/datadogreceiver/internal/metadata/generated_status.go index 1e21b9d4d901..781dce8b48f4 100644 --- a/receiver/datadogreceiver/internal/metadata/generated_status.go +++ b/receiver/datadogreceiver/internal/metadata/generated_status.go @@ -12,6 +12,6 @@ var ( ) const ( - MetricsStability = component.StabilityLevelDevelopment TracesStability = component.StabilityLevelAlpha + MetricsStability = component.StabilityLevelAlpha ) diff --git a/receiver/datadogreceiver/metadata.yaml b/receiver/datadogreceiver/metadata.yaml index a7c7ae4b35b8..c74816384df8 100644 --- a/receiver/datadogreceiver/metadata.yaml +++ b/receiver/datadogreceiver/metadata.yaml @@ -3,8 +3,7 @@ type: datadog status: class: receiver stability: - alpha: [traces] - development: [metrics] + alpha: [traces, metrics] distributions: [contrib] codeowners: active: [boostchicken, gouthamve, jpkrohling, MovieStoreGuy] @@ -12,4 +11,4 @@ status: tests: skip_lifecycle: true # Skip lifecycle tests since there are multiple receivers that run on the same port goleak: - skip: true # see https://github.com/cihub/seelog/issues/182 \ No newline at end of file + skip: true # see https://github.com/cihub/seelog/issues/182 diff --git a/receiver/dockerstatsreceiver/config_test.go b/receiver/dockerstatsreceiver/config_test.go index c9008dcb61bc..1fd7602e06df 100644 --- a/receiver/dockerstatsreceiver/config_test.go +++ b/receiver/dockerstatsreceiver/config_test.go @@ -127,8 +127,7 @@ func TestApiVersionCustomError(t *testing.T) { factory := NewFactory() cfg := factory.CreateDefaultConfig() err := sub.Unmarshal(cfg) - require.Error(t, err) - assert.Contains(t, err.Error(), + assert.ErrorContains(t, err, `Hint: You may want to wrap the 'api_version' value in quotes (api_version: "1.40")`, ) diff --git a/receiver/dockerstatsreceiver/receiver_test.go b/receiver/dockerstatsreceiver/receiver_test.go index 099267467c5c..c610668aace9 100644 --- a/receiver/dockerstatsreceiver/receiver_test.go +++ b/receiver/dockerstatsreceiver/receiver_test.go @@ -150,13 +150,11 @@ func TestErrorsInStart(t *testing.T) { cfg.Endpoint = "..not/a/valid/endpoint" err := recv.start(context.Background(), componenttest.NewNopHost()) - assert.Error(t, err) - assert.Contains(t, err.Error(), "unable to parse docker host") + assert.ErrorContains(t, err, "unable to parse docker host") cfg.Endpoint = unreachable err = recv.start(context.Background(), componenttest.NewNopHost()) - assert.Error(t, err) - assert.Contains(t, err.Error(), "context deadline exceeded") + assert.ErrorContains(t, err, "context deadline exceeded") } func TestScrapeV2(t *testing.T) { diff --git a/receiver/elasticsearchreceiver/client_test.go b/receiver/elasticsearchreceiver/client_test.go index c9e5a2d49125..fcf64eebeac6 100644 --- a/receiver/elasticsearchreceiver/client_test.go +++ b/receiver/elasticsearchreceiver/client_test.go @@ -370,8 +370,7 @@ func TestDoRequest404(t *testing.T) { require.NoError(t, err) _, err = client.doRequest(context.Background(), "invalid_path") - require.Error(t, err) - require.Contains(t, err.Error(), "404") + require.ErrorContains(t, err, "404") } func TestIndexStatsNoPassword(t *testing.T) { diff --git a/receiver/elasticsearchreceiver/config_test.go b/receiver/elasticsearchreceiver/config_test.go index 1cc8c213c28a..885e540ddb1d 100644 --- a/receiver/elasticsearchreceiver/config_test.go +++ b/receiver/elasticsearchreceiver/config_test.go @@ -129,8 +129,7 @@ func TestValidateEndpoint(t *testing.T) { case testCase.expectedErr != nil: require.ErrorIs(t, err, testCase.expectedErr) case testCase.expectedErrStr != "": - require.Error(t, err) - require.Contains(t, err.Error(), testCase.expectedErrStr) + require.ErrorContains(t, err, testCase.expectedErrStr) default: require.NoError(t, err) } diff --git a/receiver/elasticsearchreceiver/scraper_test.go b/receiver/elasticsearchreceiver/scraper_test.go index c34601544200..38d3f0b74f82 100644 --- a/receiver/elasticsearchreceiver/scraper_test.go +++ b/receiver/elasticsearchreceiver/scraper_test.go @@ -257,7 +257,7 @@ func TestScrapingError(t *testing.T) { _, err = sc.scrape(context.Background()) require.True(t, scrapererror.IsPartialScrapeError(err)) - require.Equal(t, err.Error(), err404.Error()) + require.EqualError(t, err, err404.Error()) }, }, @@ -284,7 +284,7 @@ func TestScrapingError(t *testing.T) { _, err = sc.scrape(context.Background()) require.True(t, scrapererror.IsPartialScrapeError(err)) - require.Equal(t, err.Error(), err404.Error()) + require.EqualError(t, err, err404.Error()) }, }, @@ -311,8 +311,8 @@ func TestScrapingError(t *testing.T) { sc.client = &mockClient m, err := sc.scrape(context.Background()) - require.Contains(t, err.Error(), err404.Error()) - require.Contains(t, err.Error(), err500.Error()) + require.ErrorContains(t, err, err404.Error()) + require.ErrorContains(t, err, err500.Error()) require.Equal(t, 0, m.DataPointCount()) }, @@ -340,7 +340,7 @@ func TestScrapingError(t *testing.T) { _, err = sc.scrape(context.Background()) require.True(t, scrapererror.IsPartialScrapeError(err)) - require.Contains(t, err.Error(), err404.Error()) + require.ErrorContains(t, err, err404.Error()) }, }, { @@ -366,8 +366,8 @@ func TestScrapingError(t *testing.T) { sc.client = &mockClient m, err := sc.scrape(context.Background()) - require.Contains(t, err.Error(), err404.Error()) - require.Contains(t, err.Error(), err500.Error()) + require.ErrorContains(t, err, err404.Error()) + require.ErrorContains(t, err, err500.Error()) require.Equal(t, 0, m.DataPointCount()) }, @@ -396,7 +396,7 @@ func TestScrapingError(t *testing.T) { _, err = sc.scrape(context.Background()) require.True(t, scrapererror.IsPartialScrapeError(err)) - require.Contains(t, err.Error(), errUnknownClusterStatus.Error()) + require.ErrorContains(t, err, errUnknownClusterStatus.Error()) }, }, } diff --git a/receiver/flinkmetricsreceiver/client_test.go b/receiver/flinkmetricsreceiver/client_test.go index 01a07ca4a6b4..2403e97c36c5 100644 --- a/receiver/flinkmetricsreceiver/client_test.go +++ b/receiver/flinkmetricsreceiver/client_test.go @@ -93,7 +93,7 @@ func TestNewClient(t *testing.T) { ac, err := newClient(context.Background(), tc.cfg, tc.host, tc.settings, tc.logger) if tc.expectError != nil { require.Nil(t, ac) - require.Contains(t, err.Error(), tc.expectError.Error()) + require.ErrorContains(t, err, tc.expectError.Error()) } else { require.NoError(t, err) @@ -151,7 +151,7 @@ func TestGetJobmanagerMetrics(t *testing.T) { metrics, err := tc.GetJobmanagerMetrics(context.Background()) require.Nil(t, metrics) - require.Contains(t, err.Error(), "failed to unmarshal response body") + require.ErrorContains(t, err, "failed to unmarshal response body") }, }, { @@ -220,7 +220,7 @@ func TestGetTaskmanagersMetrics(t *testing.T) { metrics, err := tc.GetTaskmanagersMetrics(context.Background()) require.Nil(t, metrics) - require.Contains(t, err.Error(), "failed to unmarshal response body:") + require.ErrorContains(t, err, "failed to unmarshal response body:") }, }, { @@ -243,7 +243,7 @@ func TestGetTaskmanagersMetrics(t *testing.T) { metrics, err := tc.GetTaskmanagersMetrics(context.Background()) require.Nil(t, metrics) - require.Contains(t, err.Error(), "failed to unmarshal response body:") + require.ErrorContains(t, err, "failed to unmarshal response body:") }, }, { @@ -321,7 +321,7 @@ func TestGetJobsMetrics(t *testing.T) { metrics, err := tc.GetJobsMetrics(context.Background()) require.Nil(t, metrics) - require.Contains(t, err.Error(), "failed to unmarshal response body") + require.ErrorContains(t, err, "failed to unmarshal response body") }, }, { @@ -343,7 +343,7 @@ func TestGetJobsMetrics(t *testing.T) { metrics, err := tc.GetJobsMetrics(context.Background()) require.Nil(t, metrics) - require.Contains(t, err.Error(), "failed to unmarshal response body") + require.ErrorContains(t, err, "failed to unmarshal response body") }, }, { @@ -423,7 +423,7 @@ func TestGetSubtasksMetrics(t *testing.T) { metrics, err := tc.GetSubtasksMetrics(context.Background()) require.Nil(t, metrics) - require.Contains(t, err.Error(), "failed to unmarshal response body") + require.ErrorContains(t, err, "failed to unmarshal response body") }, }, { @@ -445,7 +445,7 @@ func TestGetSubtasksMetrics(t *testing.T) { metrics, err := tc.GetSubtasksMetrics(context.Background()) require.Nil(t, metrics) - require.Contains(t, err.Error(), "failed to unmarshal response body") + require.ErrorContains(t, err, "failed to unmarshal response body") }, }, { @@ -473,7 +473,7 @@ func TestGetSubtasksMetrics(t *testing.T) { metrics, err := tc.GetSubtasksMetrics(context.Background()) require.Nil(t, metrics) - require.Contains(t, err.Error(), "failed to unmarshal response body") + require.ErrorContains(t, err, "failed to unmarshal response body") }, }, { @@ -507,7 +507,7 @@ func TestGetSubtasksMetrics(t *testing.T) { metrics, err := tc.GetSubtasksMetrics(context.Background()) require.Nil(t, metrics) - require.Contains(t, err.Error(), "failed to unmarshal response body") + require.ErrorContains(t, err, "failed to unmarshal response body") }, }, { diff --git a/receiver/fluentforwardreceiver/conversion_test.go b/receiver/fluentforwardreceiver/conversion_test.go index 2ffb6cdb1419..b566ad955641 100644 --- a/receiver/fluentforwardreceiver/conversion_test.go +++ b/receiver/fluentforwardreceiver/conversion_test.go @@ -188,8 +188,7 @@ func TestPackedForwardEventConversionWithErrors(t *testing.T) { var event PackedForwardEventLogRecords err := event.DecodeMsg(reader) - require.Error(t, err) - require.Contains(t, err.Error(), "gzip") + require.ErrorContains(t, err, "gzip") fmt.Println(err.Error()) }) } diff --git a/receiver/fluentforwardreceiver/go.mod b/receiver/fluentforwardreceiver/go.mod index 1893afbc968a..e160a6b9551d 100644 --- a/receiver/fluentforwardreceiver/go.mod +++ b/receiver/fluentforwardreceiver/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.110.0 github.com/stretchr/testify v1.9.0 - github.com/tinylib/msgp v1.2.1 + github.com/tinylib/msgp v1.2.2 go.opentelemetry.io/collector/component v0.110.0 go.opentelemetry.io/collector/config/configtelemetry v0.110.0 go.opentelemetry.io/collector/confmap v1.16.0 @@ -37,7 +37,7 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.110.0 // indirect - github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 // indirect + github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect go.opentelemetry.io/collector/component/componentprofiles v0.110.0 // indirect diff --git a/receiver/fluentforwardreceiver/go.sum b/receiver/fluentforwardreceiver/go.sum index a80871c747dc..f9109d7f2669 100644 --- a/receiver/fluentforwardreceiver/go.sum +++ b/receiver/fluentforwardreceiver/go.sum @@ -40,8 +40,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 h1:jYi87L8j62qkXzaYHAQAhEapgukhenIMZRBKTNRLHJ4= -github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= +github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c h1:dAMKvw0MlJT1GshSTtih8C2gDs04w8dReiOGXrGLNoY= +github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= 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= @@ -50,8 +50,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ 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/tinylib/msgp v1.2.1 h1:6ypy2qcCznxpP4hpORzhtXyTqrBs7cfM9MCCWY8zsmU= -github.com/tinylib/msgp v1.2.1/go.mod h1:2vIGs3lcUo8izAATNobrCHevYZC/LMsJtw4JPiYPHro= +github.com/tinylib/msgp v1.2.2 h1:iHiBE1tJQwFI740SPEPkGE8cfhNfrqOYRlH450BnC/4= +github.com/tinylib/msgp v1.2.2/go.mod h1:ykjzy2wzgrlvpDCRc4LA8UXy6D8bzMSuAF3WD57Gok0= 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.110.0 h1:z7uSY/1dcK+vTY2z3v0XxeCoi2wqgHTow/ds3Gozuz4= diff --git a/receiver/githubreceiver/config_test.go b/receiver/githubreceiver/config_test.go index 3a6c26542c62..bd3d8ba21000 100644 --- a/receiver/githubreceiver/config_test.go +++ b/receiver/githubreceiver/config_test.go @@ -67,7 +67,7 @@ func TestLoadInvalidConfig_NoScrapers(t *testing.T) { // nolint:staticcheck _, err = otelcoltest.LoadConfigAndValidate(filepath.Join("testdata", "config-noscrapers.yaml"), factories) - require.Contains(t, err.Error(), "must specify at least one scraper") + require.ErrorContains(t, err, "must specify at least one scraper") } func TestLoadInvalidConfig_InvalidScraperKey(t *testing.T) { @@ -80,7 +80,7 @@ func TestLoadInvalidConfig_InvalidScraperKey(t *testing.T) { // nolint:staticcheck _, err = otelcoltest.LoadConfigAndValidate(filepath.Join("testdata", "config-invalidscraperkey.yaml"), factories) - require.Contains(t, err.Error(), "error reading configuration for \"github\": invalid scraper key: \"invalidscraperkey\"") + require.ErrorContains(t, err, "error reading configuration for \"github\": invalid scraper key: \"invalidscraperkey\"") } func TestConfig_Unmarshal(t *testing.T) { diff --git a/receiver/googlecloudmonitoringreceiver/go.mod b/receiver/googlecloudmonitoringreceiver/go.mod index 75b9288bd404..4c41516e9f91 100644 --- a/receiver/googlecloudmonitoringreceiver/go.mod +++ b/receiver/googlecloudmonitoringreceiver/go.mod @@ -16,9 +16,9 @@ require ( ) require ( - cloud.google.com/go/auth v0.9.4 // indirect + cloud.google.com/go/auth v0.9.5 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect - cloud.google.com/go/compute/metadata v0.5.1 // indirect + cloud.google.com/go/compute/metadata v0.5.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/google/s2a-go v0.1.8 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect @@ -65,9 +65,9 @@ require ( golang.org/x/net v0.29.0 // indirect golang.org/x/sys v0.25.0 // indirect golang.org/x/text v0.18.0 // indirect - google.golang.org/api v0.198.0 + google.golang.org/api v0.199.0 google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/grpc v1.66.2 // indirect + google.golang.org/grpc v1.67.0 // indirect google.golang.org/protobuf v1.34.2 gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/receiver/googlecloudmonitoringreceiver/go.sum b/receiver/googlecloudmonitoringreceiver/go.sum index 9be3bbbdb90c..4b56fbf33cd6 100644 --- a/receiver/googlecloudmonitoringreceiver/go.sum +++ b/receiver/googlecloudmonitoringreceiver/go.sum @@ -1,10 +1,10 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go/auth v0.9.4 h1:DxF7imbEbiFu9+zdKC6cKBko1e8XeJnipNqIbWZ+kDI= -cloud.google.com/go/auth v0.9.4/go.mod h1:SHia8n6//Ya940F1rLimhJCjjx7KE17t0ctFEci3HkA= +cloud.google.com/go/auth v0.9.5 h1:4CTn43Eynw40aFVr3GpPqsQponx2jv0BQpjvajsbbzw= +cloud.google.com/go/auth v0.9.5/go.mod h1:Xo0n7n66eHyOWWCnitop6870Ilwo3PiZyodVkkH1xWM= cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= -cloud.google.com/go/compute/metadata v0.5.1 h1:NM6oZeZNlYjiwYje+sYFjEpP0Q0zCan1bmQW/KmIrGs= -cloud.google.com/go/compute/metadata v0.5.1/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= +cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixAHn3fyqngqo= +cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= cloud.google.com/go/monitoring v1.21.1 h1:zWtbIoBMnU5LP9A/fz8LmWMGHpk4skdfeiaa66QdFGc= cloud.google.com/go/monitoring v1.21.1/go.mod h1:Rj++LKrlht9uBi8+Eb530dIrzG/cU/lB8mt+lbeFK1c= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= @@ -204,8 +204,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.198.0 h1:OOH5fZatk57iN0A7tjJQzt6aPfYQ1JiWkt1yGseazks= -google.golang.org/api v0.198.0/go.mod h1:/Lblzl3/Xqqk9hw/yS97TImKTUwnf1bv89v7+OagJzc= +google.golang.org/api v0.199.0 h1:aWUXClp+VFJmqE0JPvpZOK3LDQMyFKYIow4etYd9qxs= +google.golang.org/api v0.199.0/go.mod h1:ohG4qSztDJmZdjK/Ar6MhbAmb/Rpi4JHOqagsh90K28= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -222,8 +222,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo= -google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= +google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/receiver/googlecloudpubsubreceiver/go.mod b/receiver/googlecloudpubsubreceiver/go.mod index 5e20d617cc99..105d16d72e9c 100644 --- a/receiver/googlecloudpubsubreceiver/go.mod +++ b/receiver/googlecloudpubsubreceiver/go.mod @@ -19,18 +19,18 @@ require ( go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - google.golang.org/api v0.198.0 + google.golang.org/api v0.199.0 google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 google.golang.org/protobuf v1.34.2 ) require ( cloud.google.com/go v0.115.1 // indirect - cloud.google.com/go/auth v0.9.4 // indirect + cloud.google.com/go/auth v0.9.5 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect - cloud.google.com/go/compute/metadata v0.5.1 // indirect + cloud.google.com/go/compute/metadata v0.5.2 // indirect cloud.google.com/go/iam v1.2.0 // indirect cloud.google.com/go/longrunning v0.6.0 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect diff --git a/receiver/googlecloudpubsubreceiver/go.sum b/receiver/googlecloudpubsubreceiver/go.sum index c0048b9365e4..31deb21a844b 100644 --- a/receiver/googlecloudpubsubreceiver/go.sum +++ b/receiver/googlecloudpubsubreceiver/go.sum @@ -1,12 +1,12 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.115.1 h1:Jo0SM9cQnSkYfp44+v+NQXHpcHqlnRJk2qxh6yvxxxQ= cloud.google.com/go v0.115.1/go.mod h1:DuujITeaufu3gL68/lOFIirVNJwQeyf5UXyi+Wbgknc= -cloud.google.com/go/auth v0.9.4 h1:DxF7imbEbiFu9+zdKC6cKBko1e8XeJnipNqIbWZ+kDI= -cloud.google.com/go/auth v0.9.4/go.mod h1:SHia8n6//Ya940F1rLimhJCjjx7KE17t0ctFEci3HkA= +cloud.google.com/go/auth v0.9.5 h1:4CTn43Eynw40aFVr3GpPqsQponx2jv0BQpjvajsbbzw= +cloud.google.com/go/auth v0.9.5/go.mod h1:Xo0n7n66eHyOWWCnitop6870Ilwo3PiZyodVkkH1xWM= cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= -cloud.google.com/go/compute/metadata v0.5.1 h1:NM6oZeZNlYjiwYje+sYFjEpP0Q0zCan1bmQW/KmIrGs= -cloud.google.com/go/compute/metadata v0.5.1/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= +cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixAHn3fyqngqo= +cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= cloud.google.com/go/iam v1.2.0 h1:kZKMKVNk/IsSSc/udOb83K0hL/Yh/Gcqpz+oAkoIFN8= cloud.google.com/go/iam v1.2.0/go.mod h1:zITGuWgsLZxd8OwAlX+eMFgZDXzBm7icj1PVTYG766Q= cloud.google.com/go/logging v1.11.0 h1:v3ktVzXMV7CwHq1MBF65wcqLMA7i+z3YxbUsoK7mOKs= @@ -232,8 +232,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/api v0.198.0 h1:OOH5fZatk57iN0A7tjJQzt6aPfYQ1JiWkt1yGseazks= -google.golang.org/api v0.198.0/go.mod h1:/Lblzl3/Xqqk9hw/yS97TImKTUwnf1bv89v7+OagJzc= +google.golang.org/api v0.199.0 h1:aWUXClp+VFJmqE0JPvpZOK3LDQMyFKYIow4etYd9qxs= +google.golang.org/api v0.199.0/go.mod h1:ohG4qSztDJmZdjK/Ar6MhbAmb/Rpi4JHOqagsh90K28= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= @@ -250,8 +250,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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 v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/receiver/googlecloudspannerreceiver/go.mod b/receiver/googlecloudspannerreceiver/go.mod index 4dac87cab86a..5e09575babb7 100644 --- a/receiver/googlecloudspannerreceiver/go.mod +++ b/receiver/googlecloudspannerreceiver/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/google go 1.22.0 require ( - cloud.google.com/go/spanner v1.67.0 + cloud.google.com/go/spanner v1.68.0 github.com/ReneKroon/ttlcache/v2 v2.11.0 github.com/mitchellh/hashstructure v1.1.0 github.com/stretchr/testify v1.9.0 @@ -16,23 +16,25 @@ require ( go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - google.golang.org/api v0.198.0 - google.golang.org/grpc v1.67.0 + google.golang.org/api v0.199.0 + google.golang.org/grpc v1.67.1 gopkg.in/yaml.v3 v3.0.1 ) require ( cel.dev/expr v0.16.0 // indirect cloud.google.com/go v0.115.1 // indirect - cloud.google.com/go/auth v0.9.4 // indirect + cloud.google.com/go/auth v0.9.5 // indirect cloud.google.com/go/auth/oauth2adapt v0.2.4 // indirect - cloud.google.com/go/compute/metadata v0.5.1 // indirect - cloud.google.com/go/iam v1.2.0 // indirect - cloud.google.com/go/longrunning v0.6.0 // indirect + cloud.google.com/go/compute/metadata v0.5.2 // indirect + cloud.google.com/go/iam v1.2.1 // indirect + cloud.google.com/go/longrunning v0.6.1 // indirect + cloud.google.com/go/monitoring v1.21.0 // indirect github.com/GoogleCloudPlatform/grpc-gcp-go/grpcgcp v1.5.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.24.1 // indirect github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/cncf/xds/go v0.0.0-20240723142845-024c85f92f20 // indirect + github.com/cncf/xds/go v0.0.0-20240822171458-6449f94b4d59 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/envoyproxy/go-control-plane v0.13.0 // indirect github.com/envoyproxy/protoc-gen-validate v1.1.0 // indirect @@ -66,6 +68,7 @@ require ( go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect go.opentelemetry.io/collector/pipeline v0.110.0 // indirect go.opentelemetry.io/collector/receiver/receiverprofiles v0.110.0 // indirect + go.opentelemetry.io/contrib/detectors/gcp v1.29.0 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect go.opentelemetry.io/otel v1.30.0 // indirect @@ -80,9 +83,8 @@ require ( golang.org/x/sys v0.25.0 // indirect golang.org/x/text v0.18.0 // indirect golang.org/x/time v0.6.0 // indirect - golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 // indirect google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect google.golang.org/protobuf v1.34.2 // indirect ) diff --git a/receiver/googlecloudspannerreceiver/go.sum b/receiver/googlecloudspannerreceiver/go.sum index 4f88801b1f86..55a9990775e4 100644 --- a/receiver/googlecloudspannerreceiver/go.sum +++ b/receiver/googlecloudspannerreceiver/go.sum @@ -101,8 +101,8 @@ cloud.google.com/go/assuredworkloads v1.7.0/go.mod h1:z/736/oNmtGAyU47reJgGN+KVo cloud.google.com/go/assuredworkloads v1.8.0/go.mod h1:AsX2cqyNCOvEQC8RMPnoc0yEarXQk6WEKkxYfL6kGIo= cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0= cloud.google.com/go/assuredworkloads v1.10.0/go.mod h1:kwdUQuXcedVdsIaKgKTp9t0UJkE5+PAVNhdQm4ZVq2E= -cloud.google.com/go/auth v0.9.4 h1:DxF7imbEbiFu9+zdKC6cKBko1e8XeJnipNqIbWZ+kDI= -cloud.google.com/go/auth v0.9.4/go.mod h1:SHia8n6//Ya940F1rLimhJCjjx7KE17t0ctFEci3HkA= +cloud.google.com/go/auth v0.9.5 h1:4CTn43Eynw40aFVr3GpPqsQponx2jv0BQpjvajsbbzw= +cloud.google.com/go/auth v0.9.5/go.mod h1:Xo0n7n66eHyOWWCnitop6870Ilwo3PiZyodVkkH1xWM= cloud.google.com/go/auth/oauth2adapt v0.2.4 h1:0GWE/FUsXhf6C+jAkWgYm7X9tK8cuEIfy19DBn6B6bY= cloud.google.com/go/auth/oauth2adapt v0.2.4/go.mod h1:jC/jOpwFP6JBxhB3P5Rr0a9HLMC/Pe3eaL4NmdvqPtc= cloud.google.com/go/automl v1.5.0/go.mod h1:34EjfoFGMZ5sgJ9EoLsRtdPSNZLcfflJR39VbVNS2M0= @@ -184,8 +184,8 @@ cloud.google.com/go/compute/metadata v0.1.0/go.mod h1:Z1VN+bulIf6bt4P/C37K4DyZYZ cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= -cloud.google.com/go/compute/metadata v0.5.1 h1:NM6oZeZNlYjiwYje+sYFjEpP0Q0zCan1bmQW/KmIrGs= -cloud.google.com/go/compute/metadata v0.5.1/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= +cloud.google.com/go/compute/metadata v0.5.2 h1:UxK4uu/Tn+I3p2dYWTfiX4wva7aYlKixAHn3fyqngqo= +cloud.google.com/go/compute/metadata v0.5.2/go.mod h1:C66sj2AluDcIqakBq/M8lw8/ybHgOZqin2obFxa/E5k= cloud.google.com/go/contactcenterinsights v1.3.0/go.mod h1:Eu2oemoePuEFc/xKFPjbTuPSj0fYJcPls9TFlPNnHHY= cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck= cloud.google.com/go/contactcenterinsights v1.6.0/go.mod h1:IIDlT6CLcDoyv79kDv8iWxMSTZhLxSCofVV5W6YFM/w= @@ -319,8 +319,8 @@ cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGE cloud.google.com/go/iam v0.11.0/go.mod h1:9PiLDanza5D+oWFZiH1uG+RnRCfEGKoyl6yo4cgWZGY= cloud.google.com/go/iam v0.12.0/go.mod h1:knyHGviacl11zrtZUoDuYpDgLjvr28sLQaG0YB2GYAY= cloud.google.com/go/iam v0.13.0/go.mod h1:ljOg+rcNfzZ5d6f1nAUJ8ZIxOaZUVoS14bKCtaLZ/D0= -cloud.google.com/go/iam v1.2.0 h1:kZKMKVNk/IsSSc/udOb83K0hL/Yh/Gcqpz+oAkoIFN8= -cloud.google.com/go/iam v1.2.0/go.mod h1:zITGuWgsLZxd8OwAlX+eMFgZDXzBm7icj1PVTYG766Q= +cloud.google.com/go/iam v1.2.1 h1:QFct02HRb7H12J/3utj0qf5tobFh9V4vR6h9eX5EBRU= +cloud.google.com/go/iam v1.2.1/go.mod h1:3VUIJDPpwT6p/amXRC5GY8fCCh70lxPygguVtI0Z4/g= cloud.google.com/go/iap v1.4.0/go.mod h1:RGFwRJdihTINIe4wZ2iCP0zF/qu18ZwyKxrhMhygBEc= cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A= cloud.google.com/go/iap v1.6.0/go.mod h1:NSuvI9C/j7UdjGjIde7t7HBz+QTwBcapPE07+sSRcLk= @@ -353,8 +353,8 @@ cloud.google.com/go/logging v1.7.0/go.mod h1:3xjP2CjkM3ZkO73aj4ASA5wRPGGCRrPIAeN cloud.google.com/go/longrunning v0.1.1/go.mod h1:UUFxuDWkv22EuY93jjmDMFT5GPQKeFVJBIF6QlTqdsE= cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc= cloud.google.com/go/longrunning v0.4.1/go.mod h1:4iWDqhBZ70CvZ6BfETbvam3T8FMvLK+eFj0E6AaRQTo= -cloud.google.com/go/longrunning v0.6.0 h1:mM1ZmaNsQsnb+5n1DNPeL0KwQd9jQRqSqSDEkBZr+aI= -cloud.google.com/go/longrunning v0.6.0/go.mod h1:uHzSZqW89h7/pasCWNYdUpwGz3PcVWhrWupreVPYLts= +cloud.google.com/go/longrunning v0.6.1 h1:lOLTFxYpr8hcRtcwWir5ITh1PAKUD/sG2lKrTSYjyMc= +cloud.google.com/go/longrunning v0.6.1/go.mod h1:nHISoOZpBcmlwbJmiVk5oDRz0qG/ZxPynEGs1iZ79s0= cloud.google.com/go/managedidentities v1.3.0/go.mod h1:UzlW3cBOiPrzucO5qWkNkh0w33KFtBJU281hacNvsdE= cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM= cloud.google.com/go/managedidentities v1.5.0/go.mod h1:+dWcZ0JlUmpuxpIDfyP5pP5y0bLdRwOS4Lp7gMni/LA= @@ -378,6 +378,8 @@ cloud.google.com/go/monitoring v1.7.0/go.mod h1:HpYse6kkGo//7p6sT0wsIC6IBDET0RhI cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4= cloud.google.com/go/monitoring v1.12.0/go.mod h1:yx8Jj2fZNEkL/GYZyTLS4ZtZEZN8WtDEiEqG4kLK50w= cloud.google.com/go/monitoring v1.13.0/go.mod h1:k2yMBAB1H9JT/QETjNkgdCGD9bPF712XiLTVr+cBrpw= +cloud.google.com/go/monitoring v1.21.0 h1:EMc0tB+d3lUewT2NzKC/hr8cSR9WsUieVywzIHetGro= +cloud.google.com/go/monitoring v1.21.0/go.mod h1:tuJ+KNDdJbetSsbSGTqnaBvbauS5kr3Q/koy3Up6r+4= cloud.google.com/go/networkconnectivity v1.4.0/go.mod h1:nOl7YL8odKyAOtzNX73/M5/mGZgqqMeryi6UPZTk/rA= cloud.google.com/go/networkconnectivity v1.5.0/go.mod h1:3GzqJx7uhtlM3kln0+x5wyFvuVH1pIBJjhCpjzSt75o= cloud.google.com/go/networkconnectivity v1.6.0/go.mod h1:OJOoEXW+0LAxHh89nXd64uGG+FbQoeH8DtxCHVOMlaM= @@ -524,8 +526,8 @@ cloud.google.com/go/shell v1.6.0/go.mod h1:oHO8QACS90luWgxP3N9iZVuEiSF84zNyLytb+ cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos= cloud.google.com/go/spanner v1.44.0/go.mod h1:G8XIgYdOK+Fbcpbs7p2fiprDw4CaZX63whnSMLVBxjk= cloud.google.com/go/spanner v1.45.0/go.mod h1:FIws5LowYz8YAE1J8fOS7DJup8ff7xJeetWEo5REA2M= -cloud.google.com/go/spanner v1.67.0 h1:h8xfobxh5lQu4qJVMPH+wSiyU+ZM6ZTxRNqGeu9iIVA= -cloud.google.com/go/spanner v1.67.0/go.mod h1:Um+TNmxfcCHqNCKid4rmAMvoe/Iu1vdz6UfxJ9GPxRQ= +cloud.google.com/go/spanner v1.68.0 h1:54nL8lEUj5A6frSGnL9VPmHDYbV5UwVkK8fbdnZyDCs= +cloud.google.com/go/spanner v1.68.0/go.mod h1:X5T0XftydYp0K1adeJQDJtdWpbrOeJ7wHecM4tK6FiE= cloud.google.com/go/speech v1.6.0/go.mod h1:79tcr4FHCimOp56lwC01xnt/WPJZc4v3gzyT7FoBkCM= cloud.google.com/go/speech v1.7.0/go.mod h1:KptqL+BAQIhMsj1kOP2la5DSEEerPDuOP/2mmkhHhZQ= cloud.google.com/go/speech v1.8.0/go.mod h1:9bYIl1/tjsAnMgKGHKmBZzXKEkGgtU+MpdDPTE9f7y0= @@ -615,6 +617,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/GoogleCloudPlatform/grpc-gcp-go/grpcgcp v1.5.0 h1:oVLqHXhnYtUwM89y9T1fXGaK9wTkXHgNp8/ZNMQzUxE= github.com/GoogleCloudPlatform/grpc-gcp-go/grpcgcp v1.5.0/go.mod h1:dppbR7CwXD4pgtV9t3wD1812RaLDcBjtblcDF5f1vI0= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.24.1 h1:pB2F2JKCj1Znmp2rwxxt1J0Fg0wezTMgWYk5Mpbi1kg= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.24.1/go.mod h1:itPGVDKf9cC/ov4MdvJ2QZ0khw4bfoo9jzwTJlaxy2k= github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/ReneKroon/ttlcache/v2 v2.11.0 h1:OvlcYFYi941SBN3v9dsDcC2N8vRxyHcCmJb3Vl4QMoM= @@ -656,8 +660,8 @@ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20240723142845-024c85f92f20 h1:N+3sFI5GUjRKBi+i0TxYVST9h4Ie192jJWpHvthBBgg= -github.com/cncf/xds/go v0.0.0-20240723142845-024c85f92f20/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= +github.com/cncf/xds/go v0.0.0-20240822171458-6449f94b4d59 h1:fLZ97KE86ELjEYJCEUVzmbhfzDxHHGwBrDVMd4XL6Bs= +github.com/cncf/xds/go v0.0.0-20240822171458-6449f94b4d59/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= @@ -968,6 +972,8 @@ go.opentelemetry.io/collector/receiver v0.110.0 h1:uv+mCadEpWT7yoRvMil1bY44aZbZ7 go.opentelemetry.io/collector/receiver v0.110.0/go.mod h1:rTNskk6R+8bU4dlAB1IgdwkIiBl44+C6qcvdyarAyF0= go.opentelemetry.io/collector/receiver/receiverprofiles v0.110.0 h1:QDbKYVQFlQJfo05qS8O0zyZghxeGmxlVUKIuIJQST6U= go.opentelemetry.io/collector/receiver/receiverprofiles v0.110.0/go.mod h1:DsNqyNWfax62zb1y2ek2ERzrEAiaJocSfc+QLtHNnxI= +go.opentelemetry.io/contrib/detectors/gcp v1.29.0 h1:TiaiXB4DpGD3sdzNlYQxruQngn5Apwzi1X0DRhuGvDQ= +go.opentelemetry.io/contrib/detectors/gcp v1.29.0/go.mod h1:GW2aWZNwR2ZxDLdv8OyC2G8zkRoQBuURgV7RPQgcPoU= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 h1:r6I7RJCN86bpD/FQwedZ0vSixDpwuWREjW9oRMsmqDc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0/go.mod h1:B9yO6b04uB80CzjedvewuqDhxJxi11s7/GtiGa8bAjI= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 h1:TT4fX+nBOA/+LUkobKGW1ydGcn+G3vRw9+g5HwCphpk= @@ -1354,8 +1360,6 @@ golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9 h1:LLhsEBxRTBLuKlQxFBYUOU8xyFgXv6cOTp2HASDlsDk= -golang.org/x/xerrors v0.0.0-20240716161551-93cc26a95ae9/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.8.2/go.mod h1:oe/vMfY3deqTw+1EZJhuvEW2iwGF1bW9wwu7XCu0+v0= gonum.org/v1/gonum v0.9.3/go.mod h1:TZumC3NeyVQskjXqmyWt4S3bINhy7B4eYwW69EbyX+0= @@ -1421,8 +1425,8 @@ google.golang.org/api v0.108.0/go.mod h1:2Ts0XTHNVWxypznxWOYUeI4g3WdP9Pk2Qk58+a/ google.golang.org/api v0.110.0/go.mod h1:7FC4Vvx1Mooxh8C5HWjzZHcavuS2f6pmJpZx60ca7iI= google.golang.org/api v0.111.0/go.mod h1:qtFHvU9mhgTJegR31csQ+rwxyUTHOKFqCKWp1J0fdw0= google.golang.org/api v0.114.0/go.mod h1:ifYI2ZsFK6/uGddGfAD5BMxlnkBqCmqHSDUVi45N5Yg= -google.golang.org/api v0.198.0 h1:OOH5fZatk57iN0A7tjJQzt6aPfYQ1JiWkt1yGseazks= -google.golang.org/api v0.198.0/go.mod h1:/Lblzl3/Xqqk9hw/yS97TImKTUwnf1bv89v7+OagJzc= +google.golang.org/api v0.199.0 h1:aWUXClp+VFJmqE0JPvpZOK3LDQMyFKYIow4etYd9qxs= +google.golang.org/api v0.199.0/go.mod h1:ohG4qSztDJmZdjK/Ar6MhbAmb/Rpi4JHOqagsh90K28= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1564,8 +1568,8 @@ google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOl google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU= google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1 h1:BulPr26Jqjnd4eYDVe+YvyR7Yc2vJGkO5/0UxD0/jZU= google.golang.org/genproto v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:hL97c3SYopEHblzpxRL4lSs523++l8DYxGM1FQiYmb4= -google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed h1:3RgNmBoI9MZhsj3QxC+AP/qQhNwpCLOvYDYYsFrhFt0= -google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 h1:hjSy6tcFQZ171igDaN5QHOw2n6vx40juYbC/x67CEhc= +google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:qpvKtACPCQhAdu3PyQgV4l3LMXZEtft7y8QcarRsp9I= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -1609,8 +1613,8 @@ google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5v google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/grpc v1.54.0/go.mod h1:PUSEXI6iWghWaB6lXM4knEgpJNu2qUcKfDtNci3EC2g= google.golang.org/grpc v1.56.3/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E= +google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= diff --git a/receiver/hostmetricsreceiver/README.md b/receiver/hostmetricsreceiver/README.md index 1098fbe6f4ca..d4ab9b7e6a94 100644 --- a/receiver/hostmetricsreceiver/README.md +++ b/receiver/hostmetricsreceiver/README.md @@ -114,6 +114,7 @@ process: : names: [ , ... ] match_type: + mute_process_all_errors: mute_process_name_error: mute_process_exe_error: mute_process_io_error: @@ -123,12 +124,12 @@ process: ``` The following settings are optional: - -- `mute_process_name_error` (default: false): mute the error encountered when trying to read a process name the collector does not have permission to read -- `mute_process_io_error` (default: false): mute the error encountered when trying to read IO metrics of a process the collector does not have permission to read -- `mute_process_cgroup_error` (default: false): mute the error encountered when trying to read the cgroup of a process the collector does not have permission to read -- `mute_process_exe_error` (default: false): mute the error encountered when trying to read the executable path of a process the collector does not have permission to read (Linux only) -- `mute_process_user_error` (default: false): mute the error encountered when trying to read a uid which doesn't exist on the system, eg. is owned by a user that only exists in a container. +- `mute_process_all_errors` (default: false): mute all the errors encountered when trying to read metrics of a process. When this flag is enabled, there is no need to activate any other error suppression flags. +- `mute_process_name_error` (default: false): mute the error encountered when trying to read a process name the collector does not have permission to read. This flag is ignored when `mute_process_all_errors` is set to true as all errors are muted. +- `mute_process_io_error` (default: false): mute the error encountered when trying to read IO metrics of a process the collector does not have permission to read. This flag is ignored when `mute_process_all_errors` is set to true as all errors are muted. +- `mute_process_cgroup_error` (default: false): mute the error encountered when trying to read the cgroup of a process the collector does not have permission to read. This flag is ignored when `mute_process_all_errors` is set to true as all errors are muted. +- `mute_process_exe_error` (default: false): mute the error encountered when trying to read the executable path of a process the collector does not have permission to read (Linux only). This flag is ignored when `mute_process_all_errors` is set to true as all errors are muted. +- `mute_process_user_error` (default: false): mute the error encountered when trying to read a uid which doesn't exist on the system, eg. is owned by a user that only exists in a container. This flag is ignored when `mute_process_all_errors` is set to true as all errors are muted. ## Advanced Configuration diff --git a/receiver/hostmetricsreceiver/config_test.go b/receiver/hostmetricsreceiver/config_test.go index 61559ac81f90..fcb722db6817 100644 --- a/receiver/hostmetricsreceiver/config_test.go +++ b/receiver/hostmetricsreceiver/config_test.go @@ -134,7 +134,7 @@ func TestLoadInvalidConfig_NoScrapers(t *testing.T) { // nolint:staticcheck _, err = otelcoltest.LoadConfigAndValidate(filepath.Join("testdata", "config-noscrapers.yaml"), factories) - require.Contains(t, err.Error(), "must specify at least one scraper when using hostmetrics receiver") + require.ErrorContains(t, err, "must specify at least one scraper when using hostmetrics receiver") } func TestLoadInvalidConfig_InvalidScraperKey(t *testing.T) { @@ -147,5 +147,5 @@ func TestLoadInvalidConfig_InvalidScraperKey(t *testing.T) { // nolint:staticcheck _, err = otelcoltest.LoadConfigAndValidate(filepath.Join("testdata", "config-invalidscraperkey.yaml"), factories) - require.Contains(t, err.Error(), "error reading configuration for \"hostmetrics\": invalid scraper key: invalidscraperkey") + require.ErrorContains(t, err, "error reading configuration for \"hostmetrics\": invalid scraper key: invalidscraperkey") } diff --git a/receiver/hostmetricsreceiver/go.mod b/receiver/hostmetricsreceiver/go.mod index 446d8692515d..1f6e5d212deb 100644 --- a/receiver/hostmetricsreceiver/go.mod +++ b/receiver/hostmetricsreceiver/go.mod @@ -10,7 +10,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.110.0 github.com/prometheus-community/windows_exporter v0.27.2 github.com/prometheus/procfs v0.15.1 - github.com/shirou/gopsutil/v4 v4.24.8 + github.com/shirou/gopsutil/v4 v4.24.9 github.com/stretchr/testify v1.9.0 github.com/yusufpapurcu/wmi v1.2.4 go.opentelemetry.io/collector/component v0.110.0 @@ -47,6 +47,7 @@ require ( github.com/docker/docker v26.1.5+incompatible // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect + github.com/ebitengine/purego v0.8.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect diff --git a/receiver/hostmetricsreceiver/go.sum b/receiver/hostmetricsreceiver/go.sum index 1182449b341f..82d1e1dc329f 100644 --- a/receiver/hostmetricsreceiver/go.sum +++ b/receiver/hostmetricsreceiver/go.sum @@ -36,6 +36,8 @@ github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/ebitengine/purego v0.8.0 h1:JbqvnEzRvPpxhCJzJJ2y0RbiZ8nyjccVUrSM3q+GvvE= +github.com/ebitengine/purego v0.8.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= @@ -144,8 +146,8 @@ github.com/rs/cors v1.11.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI= github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk= -github.com/shirou/gopsutil/v4 v4.24.8 h1:pVQjIenQkIhqO81mwTaXjTzOMT7d3TZkf43PlVFHENI= -github.com/shirou/gopsutil/v4 v4.24.8/go.mod h1:wE0OrJtj4dG+hYkxqDH3QiBICdKSf04/npcvLLc/oRg= +github.com/shirou/gopsutil/v4 v4.24.9 h1:KIV+/HaHD5ka5f570RZq+2SaeFsb/pq+fp2DGNWYoOI= +github.com/shirou/gopsutil/v4 v4.24.9/go.mod h1:3fkaHNeYsUFCGZ8+9vZVWtbyM1k2eRnlL+bWO8Bxa/Q= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= diff --git a/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/filesystem_scraper_test.go b/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/filesystem_scraper_test.go index 726ec916b081..d438357c58e0 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/filesystem_scraper_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/filesystem_scraper_test.go @@ -383,7 +383,7 @@ func TestScrape(t *testing.T) { md, err := scraper.scrape(context.Background()) if test.expectedErr != "" { - assert.Contains(t, err.Error(), test.expectedErr) + assert.ErrorContains(t, err, test.expectedErr) isPartial := scrapererror.IsPartialScrapeError(err) assert.True(t, isPartial) diff --git a/receiver/hostmetricsreceiver/internal/scraper/processscraper/config.go b/receiver/hostmetricsreceiver/internal/scraper/processscraper/config.go index 76003bf72ce0..60c3ea0b8535 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/processscraper/config.go +++ b/receiver/hostmetricsreceiver/internal/scraper/processscraper/config.go @@ -22,29 +22,38 @@ type Config struct { Include MatchConfig `mapstructure:"include"` Exclude MatchConfig `mapstructure:"exclude"` + // MuteProcessAllErrors is a flag that will mute all the errors encountered when trying to read metrics of a process. + // When this flag is enabled, there is no need to activate any other error suppression flags. + MuteProcessAllErrors bool `mapstructure:"mute_process_all_errors,omitempty"` + // MuteProcessNameError is a flag that will mute the error encountered when trying to read a process name the // collector does not have permission to read. // See https://github.com/open-telemetry/opentelemetry-collector/issues/3004 for more information. + // This flag is ignored when MuteProcessAllErrors is set to true as all errors are muted. MuteProcessNameError bool `mapstructure:"mute_process_name_error,omitempty"` // MuteProcessIOError is a flag that will mute the error encountered when trying to read IO metrics of a process // the collector does not have permission to read. + // This flag is ignored when MuteProcessAllErrors is set to true as all errors are muted. MuteProcessIOError bool `mapstructure:"mute_process_io_error,omitempty"` // MuteProcessCgroupError is a flag that will mute the error encountered when trying to read the cgroup of a process // the collector does not have permission to read. + // This flag is ignored when MuteProcessAllErrors is set to true as all errors are muted. MuteProcessCgroupError bool `mapstructure:"mute_process_cgroup_error,omitempty"` // MuteProcessExeError is a flag that will mute the error encountered when trying to read the executable path of a process - // the collector does not have permission to read (Linux) + // the collector does not have permission to read (Linux). + // This flag is ignored when MuteProcessAllErrors is set to true as all errors are muted. MuteProcessExeError bool `mapstructure:"mute_process_exe_error,omitempty"` // MuteProcessUserError is a flag that will mute the error encountered when trying to read uid which - // doesn't exist on the system, eg. is owned by user existing in container only + // doesn't exist on the system, eg. is owned by user existing in container only. + // This flag is ignored when MuteProcessAllErrors is set to true as all errors are muted. MuteProcessUserError bool `mapstructure:"mute_process_user_error,omitempty"` // ScrapeProcessDelay is used to indicate the minimum amount of time a process must be running - // before metrics are scraped for it. The default value is 0 seconds (0s) + // before metrics are scraped for it. The default value is 0 seconds (0s). ScrapeProcessDelay time.Duration `mapstructure:"scrape_process_delay"` } diff --git a/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper.go b/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper.go index 3b9a4bbee701..0a918a112ba1 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper.go +++ b/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper.go @@ -187,6 +187,10 @@ func (s *scraper) scrape(ctx context.Context) (pmetric.Metrics, error) { } } + if s.config.MuteProcessAllErrors { + return s.mb.Emit(), nil + } + return s.mb.Emit(), errs.Combine() } diff --git a/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper_test.go b/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper_test.go index b1a232e5d7cd..4d983b8a664e 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper_test.go @@ -1003,6 +1003,7 @@ func TestScrapeMetrics_MuteErrorFlags(t *testing.T) { muteProcessExeError bool muteProcessIOError bool muteProcessUserError bool + muteProcessAllErrors bool skipProcessNameError bool omitConfigField bool expectedError string @@ -1093,6 +1094,30 @@ func TestScrapeMetrics_MuteErrorFlags(t *testing.T) { return 4 }(), }, + { + name: "All Process Errors Muted", + muteProcessNameError: false, + muteProcessExeError: false, + muteProcessIOError: false, + muteProcessUserError: false, + muteProcessAllErrors: true, + expectedCount: 0, + }, + { + name: "Process User Error Enabled and All Process Errors Muted", + muteProcessUserError: false, + skipProcessNameError: true, + muteProcessExeError: true, + muteProcessNameError: true, + muteProcessAllErrors: true, + expectedCount: func() int { + if runtime.GOOS == "darwin" { + // disk.io is not collected on darwin + return 3 + } + return 4 + }(), + }, } for _, test := range testCases { @@ -1106,6 +1131,7 @@ func TestScrapeMetrics_MuteErrorFlags(t *testing.T) { config.MuteProcessExeError = test.muteProcessExeError config.MuteProcessIOError = test.muteProcessIOError config.MuteProcessUserError = test.muteProcessUserError + config.MuteProcessAllErrors = test.muteProcessAllErrors } scraper, err := newProcessScraper(receivertest.NewNopSettings(), config) require.NoError(t, err, "Failed to create process scraper: %v", err) @@ -1135,7 +1161,7 @@ func TestScrapeMetrics_MuteErrorFlags(t *testing.T) { assert.Equal(t, test.expectedCount, md.MetricCount()) - if config.MuteProcessNameError && config.MuteProcessExeError && config.MuteProcessUserError { + if (config.MuteProcessNameError && config.MuteProcessExeError && config.MuteProcessUserError) || config.MuteProcessAllErrors { assert.NoError(t, err) } else { assert.EqualError(t, err, test.expectedError) diff --git a/receiver/jaegerreceiver/go.mod b/receiver/jaegerreceiver/go.mod index e2014748b6ad..5debc3877af2 100644 --- a/receiver/jaegerreceiver/go.mod +++ b/receiver/jaegerreceiver/go.mod @@ -26,7 +26,7 @@ require ( go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 ) require ( diff --git a/receiver/jaegerreceiver/go.sum b/receiver/jaegerreceiver/go.sum index dfb05f305ae8..b5cf908821f0 100644 --- a/receiver/jaegerreceiver/go.sum +++ b/receiver/jaegerreceiver/go.sum @@ -232,8 +232,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/receiver/jmxreceiver/go.mod b/receiver/jmxreceiver/go.mod index 885b317909dd..99791cf39770 100644 --- a/receiver/jmxreceiver/go.mod +++ b/receiver/jmxreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.110.0 - github.com/shirou/gopsutil/v4 v4.24.8 + github.com/shirou/gopsutil/v4 v4.24.9 github.com/stretchr/testify v1.9.0 github.com/testcontainers/testcontainers-go v0.31.0 go.opentelemetry.io/collector/component v0.110.0 @@ -37,6 +37,7 @@ require ( github.com/docker/docker v26.1.5+incompatible // indirect github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect + github.com/ebitengine/purego v0.8.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/go-logr/logr v1.4.2 // indirect diff --git a/receiver/jmxreceiver/go.sum b/receiver/jmxreceiver/go.sum index 1de20797a875..503ae1b5fe49 100644 --- a/receiver/jmxreceiver/go.sum +++ b/receiver/jmxreceiver/go.sum @@ -31,6 +31,8 @@ github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/ebitengine/purego v0.8.0 h1:JbqvnEzRvPpxhCJzJJ2y0RbiZ8nyjccVUrSM3q+GvvE= +github.com/ebitengine/purego v0.8.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= @@ -117,8 +119,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/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI= github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk= -github.com/shirou/gopsutil/v4 v4.24.8 h1:pVQjIenQkIhqO81mwTaXjTzOMT7d3TZkf43PlVFHENI= -github.com/shirou/gopsutil/v4 v4.24.8/go.mod h1:wE0OrJtj4dG+hYkxqDH3QiBICdKSf04/npcvLLc/oRg= +github.com/shirou/gopsutil/v4 v4.24.9 h1:KIV+/HaHD5ka5f570RZq+2SaeFsb/pq+fp2DGNWYoOI= +github.com/shirou/gopsutil/v4 v4.24.9/go.mod h1:3fkaHNeYsUFCGZ8+9vZVWtbyM1k2eRnlL+bWO8Bxa/Q= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= diff --git a/receiver/jmxreceiver/integration_test.go b/receiver/jmxreceiver/integration_test.go index 67d2f95b37b3..79a9d14894b6 100644 --- a/receiver/jmxreceiver/integration_test.go +++ b/receiver/jmxreceiver/integration_test.go @@ -157,5 +157,5 @@ func TestJMXReceiverInvalidOTLPEndpointIntegration(t *testing.T) { }() err := receiver.Start(context.Background(), componenttest.NewNopHost()) - require.Contains(t, err.Error(), "listen tcp: lookup :") + require.ErrorContains(t, err, "listen tcp: lookup :") } diff --git a/receiver/jmxreceiver/receiver_test.go b/receiver/jmxreceiver/receiver_test.go index ad0e970031ab..acf322ce65d4 100644 --- a/receiver/jmxreceiver/receiver_test.go +++ b/receiver/jmxreceiver/receiver_test.go @@ -181,8 +181,7 @@ func TestBuildOTLPReceiverInvalidEndpoints(t *testing.T) { params := receivertest.NewNopSettings() jmxReceiver := newJMXMetricReceiver(params, test.config, consumertest.NewNop()) otlpReceiver, err := jmxReceiver.buildOTLPReceiver() - require.Error(t, err) - require.Contains(t, err.Error(), test.expectedErr) + require.ErrorContains(t, err, test.expectedErr) require.Nil(t, otlpReceiver) }) } diff --git a/receiver/kafkametricsreceiver/receiver_test.go b/receiver/kafkametricsreceiver/receiver_test.go index efbc7527f71c..455cc797ae04 100644 --- a/receiver/kafkametricsreceiver/receiver_test.go +++ b/receiver/kafkametricsreceiver/receiver_test.go @@ -53,8 +53,7 @@ func TestNewReceiver_invalid_auth_error(t *testing.T) { }, } r, err := newMetricsReceiver(context.Background(), *c, receivertest.NewNopSettings(), nil) - assert.Error(t, err) - assert.Contains(t, err.Error(), "failed to load TLS config") + assert.ErrorContains(t, err, "failed to load TLS config") assert.Nil(t, r) } diff --git a/receiver/kafkareceiver/kafka_receiver_test.go b/receiver/kafkareceiver/kafka_receiver_test.go index 2bc0f4ea57d8..9313ff805f1d 100644 --- a/receiver/kafkareceiver/kafka_receiver_test.go +++ b/receiver/kafkareceiver/kafka_receiver_test.go @@ -76,7 +76,7 @@ func TestNewTracesReceiver_err_auth_type(t *testing.T) { require.NoError(t, err) require.NotNil(t, r) err = r.Start(context.Background(), componenttest.NewNopHost()) - assert.Contains(t, err.Error(), "failed to load TLS config") + assert.ErrorContains(t, err, "failed to load TLS config") } func TestNewTracesReceiver_initial_offset_err(t *testing.T) { @@ -428,8 +428,7 @@ func TestNewMetricsExporter_err_auth_type(t *testing.T) { require.NoError(t, err) require.NotNil(t, r) err = r.Start(context.Background(), componenttest.NewNopHost()) - assert.Error(t, err) - assert.Contains(t, err.Error(), "failed to load TLS config") + assert.ErrorContains(t, err, "failed to load TLS config") } func TestNewMetricsReceiver_initial_offset_err(t *testing.T) { @@ -768,8 +767,7 @@ func TestNewLogsExporter_err_auth_type(t *testing.T) { require.NoError(t, err) require.NotNil(t, r) err = r.Start(context.Background(), componenttest.NewNopHost()) - assert.Error(t, err) - assert.Contains(t, err.Error(), "failed to load TLS config") + assert.ErrorContains(t, err, "failed to load TLS config") } func TestNewLogsReceiver_initial_offset_err(t *testing.T) { diff --git a/receiver/kubeletstatsreceiver/README.md b/receiver/kubeletstatsreceiver/README.md index a250ba5dff37..65596786d9a0 100644 --- a/receiver/kubeletstatsreceiver/README.md +++ b/receiver/kubeletstatsreceiver/README.md @@ -285,3 +285,23 @@ rules: resources: ["nodes/proxy"] verbs: ["get"] ``` + +### Warning about metrics' deprecation + +The following metrics will be renamed in a future version: +- `k8s.node.cpu.utilization` (renamed to `k8s.node.cpu.usage`) +- `k8s.pod.cpu.utilization` (renamed to `k8s.pod.cpu.usage`) +- `container.cpu.utilization` (renamed to `container.cpu.usage`) + +The above metrics show usage counted in CPUs and it's not a percentage of used resources. +These metrics were previously incorrectly named using the utilization term. + +#### `receiver.kubeletstats.enableCPUUsageMetrics` feature gate + +- alpha: when enabled it makes the `.cpu.usage` metrics enabled by default, disabling the `.cpu.utilization` metrics +- beta: `.cpu.usage` metrics are enabled by default and any configuration enabling the deprecated `.cpu.utilization` metrics will be failing. Explicitly disabling the feature gate provides the old (deprecated) behavior. +- stable: `.cpu.usage` metrics are enabled by default and the deprecated metrics are completely removed. +- removed three releases after stable. + +More information about the deprecation plan and +the background reasoning can be found at https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/27885. \ No newline at end of file diff --git a/receiver/kubeletstatsreceiver/factory.go b/receiver/kubeletstatsreceiver/factory.go index d5ed491f5a65..bc831b11a760 100644 --- a/receiver/kubeletstatsreceiver/factory.go +++ b/receiver/kubeletstatsreceiver/factory.go @@ -9,6 +9,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/featuregate" "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/scraperhelper" "go.uber.org/zap" @@ -20,7 +21,16 @@ import ( ) const ( - metricGroupsConfig = "metric_groups" + metricGroupsConfig = "metric_groups" + enableCPUUsageMetricsFeatureFlag = "receiver.kubeletstats.enableCPUUsageMetrics" +) + +var enableCPUUsageMetrics = featuregate.GlobalRegistry().MustRegister( + enableCPUUsageMetricsFeatureFlag, + featuregate.StageAlpha, + featuregate.WithRegisterDescription("When enabled the container.cpu.utilization, k8s.pod.cpu.utilization and k8s.node.cpu.utilization metrics will be replaced by the container.cpu.usage, k8s.pod.cpu.usage and k8s.node.cpu.usage"), + featuregate.WithRegisterFromVersion("v0.110.0"), + featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/27885"), ) var defaultMetricGroups = []kubelet.MetricGroup{ @@ -68,6 +78,31 @@ func createMetricsReceiver( return nil, err } + if enableCPUUsageMetrics.IsEnabled() { + if cfg.MetricsBuilderConfig.Metrics.ContainerCPUUtilization.Enabled { + cfg.MetricsBuilderConfig.Metrics.ContainerCPUUtilization.Enabled = false + cfg.MetricsBuilderConfig.Metrics.ContainerCPUUsage.Enabled = true + } + if cfg.MetricsBuilderConfig.Metrics.K8sPodCPUUtilization.Enabled { + cfg.MetricsBuilderConfig.Metrics.K8sPodCPUUtilization.Enabled = false + cfg.MetricsBuilderConfig.Metrics.K8sPodCPUUsage.Enabled = true + } + if cfg.MetricsBuilderConfig.Metrics.K8sNodeCPUUtilization.Enabled { + cfg.MetricsBuilderConfig.Metrics.K8sNodeCPUUtilization.Enabled = false + cfg.MetricsBuilderConfig.Metrics.K8sNodeCPUUsage.Enabled = true + } + } else { + if cfg.MetricsBuilderConfig.Metrics.ContainerCPUUtilization.Enabled { + set.Logger.Warn("The default metric container.cpu.utilization is being replaced by the container.cpu.usage metric. Switch now by enabling the receiver.kubeletstats.enableCPUUsageMetrics feature gate.") + } + if cfg.MetricsBuilderConfig.Metrics.K8sPodCPUUtilization.Enabled { + set.Logger.Warn("The default metric k8s.pod.cpu.utilization is being replaced by the k8s.pod.cpu.usage metric. Switch now by enabling the receiver.kubeletstats.enableCPUUsageMetrics feature gate.") + } + if cfg.MetricsBuilderConfig.Metrics.K8sNodeCPUUtilization.Enabled { + set.Logger.Warn("The default metric k8s.node.cpu.utilization is being replaced by the k8s.node.cpu.usage metric. Switch now by enabling the receiver.kubeletstats.enableCPUUsageMetrics feature gate.") + } + } + scrp, err := newKubletScraper(rest, set, rOptions, cfg.MetricsBuilderConfig, cfg.NodeName) if err != nil { return nil, err diff --git a/receiver/kubeletstatsreceiver/go.mod b/receiver/kubeletstatsreceiver/go.mod index 03b1346bda82..874dc66b9ac8 100644 --- a/receiver/kubeletstatsreceiver/go.mod +++ b/receiver/kubeletstatsreceiver/go.mod @@ -17,6 +17,7 @@ require ( go.opentelemetry.io/collector/confmap v1.16.0 go.opentelemetry.io/collector/consumer v0.110.0 go.opentelemetry.io/collector/consumer/consumertest v0.110.0 + go.opentelemetry.io/collector/featuregate v1.16.0 go.opentelemetry.io/collector/filter v0.110.0 go.opentelemetry.io/collector/pdata v1.16.0 go.opentelemetry.io/collector/pipeline v0.110.0 @@ -56,6 +57,7 @@ require ( github.com/golang/snappy v0.0.4 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/google/gofuzz v1.2.0 // indirect + github.com/hashicorp/go-version v1.7.0 // indirect github.com/imdario/mergo v0.3.11 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect diff --git a/receiver/kubeletstatsreceiver/go.sum b/receiver/kubeletstatsreceiver/go.sum index afc2c26a24e7..aca29ff33744 100644 --- a/receiver/kubeletstatsreceiver/go.sum +++ b/receiver/kubeletstatsreceiver/go.sum @@ -173,6 +173,8 @@ github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k= +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/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= @@ -337,6 +339,8 @@ go.opentelemetry.io/collector/extension v0.110.0 h1:AYFk57W25f7xOo3I6pV0rWNWVtOL go.opentelemetry.io/collector/extension v0.110.0/go.mod h1:zD/pw9o83SFyn/DCbBdBcH0eUPyGtYgpMSAOqotFYRc= go.opentelemetry.io/collector/extension/auth v0.110.0 h1:9SHC2sF/KR99LciHABDXRIsXLiujzIjTJpWHO0V8Bqg= go.opentelemetry.io/collector/extension/auth v0.110.0/go.mod h1:NjpHds6mjeT8Zn2KJVxZtV9c59AoIr6RlBha1RpmScQ= +go.opentelemetry.io/collector/featuregate v1.16.0 h1:mNA/ga+5FErnbJ/47KsGsF+CWqgQSOxTIseo6WuMcsc= +go.opentelemetry.io/collector/featuregate v1.16.0/go.mod h1:47xrISO71vJ83LSMm8+yIDsUbKktUp48Ovt7RR6VbRs= go.opentelemetry.io/collector/filter v0.110.0 h1:yepvSd82x8gQwFaEb49AS2wOWdJxWVC+RCY5J+JMxgY= go.opentelemetry.io/collector/filter v0.110.0/go.mod h1:cYdCpDj9WtHZkLtPCMsOWH9QFU686j8K93n2jO+mdjw= go.opentelemetry.io/collector/internal/globalsignal v0.110.0 h1:S6bfFEiek8vJeXAbciWS7W8UR6ZrVJB3ftNyFTMHQaY= diff --git a/receiver/kubeletstatsreceiver/internal/metadata/generated_metrics.go b/receiver/kubeletstatsreceiver/internal/metadata/generated_metrics.go index 7fc1c918ac0c..32883ff709d9 100644 --- a/receiver/kubeletstatsreceiver/internal/metadata/generated_metrics.go +++ b/receiver/kubeletstatsreceiver/internal/metadata/generated_metrics.go @@ -3102,10 +3102,10 @@ func WithStartTime(startTime pcommon.Timestamp) MetricBuilderOption { func NewMetricsBuilder(mbc MetricsBuilderConfig, settings receiver.Settings, options ...MetricBuilderOption) *MetricsBuilder { if mbc.Metrics.ContainerCPUUtilization.Enabled { - settings.Logger.Warn("[WARNING] `container.cpu.utilization` should not be enabled: WARNING: This metric will be disabled in a future release. Use metric container.cpu.usage instead.") + settings.Logger.Warn("[WARNING] `container.cpu.utilization` should not be enabled: This metric will be disabled in a future release. Use metric container.cpu.usage instead.") } if mbc.Metrics.K8sNodeCPUUtilization.Enabled { - settings.Logger.Warn("[WARNING] `k8s.node.cpu.utilization` should not be enabled: WARNING: This metric will be disabled in a future release. Use metric k8s.node.cpu.usage instead.") + settings.Logger.Warn("[WARNING] `k8s.node.cpu.utilization` should not be enabled: This metric will be disabled in a future release. Use metric k8s.node.cpu.usage instead.") } if mbc.Metrics.K8sPodCPUUtilization.Enabled { settings.Logger.Warn("[WARNING] `k8s.pod.cpu.utilization` should not be enabled: This metric will be disabled in a future release. Use metric k8s.pod.cpu.usage instead.") diff --git a/receiver/kubeletstatsreceiver/internal/metadata/generated_metrics_test.go b/receiver/kubeletstatsreceiver/internal/metadata/generated_metrics_test.go index 1f4325186b76..6a0606a51e85 100644 --- a/receiver/kubeletstatsreceiver/internal/metadata/generated_metrics_test.go +++ b/receiver/kubeletstatsreceiver/internal/metadata/generated_metrics_test.go @@ -63,11 +63,11 @@ func TestMetricsBuilder(t *testing.T) { expectedWarnings := 0 if tt.metricsSet == testDataSetDefault || tt.metricsSet == testDataSetAll { - assert.Equal(t, "[WARNING] `container.cpu.utilization` should not be enabled: WARNING: This metric will be disabled in a future release. Use metric container.cpu.usage instead.", observedLogs.All()[expectedWarnings].Message) + assert.Equal(t, "[WARNING] `container.cpu.utilization` should not be enabled: This metric will be disabled in a future release. Use metric container.cpu.usage instead.", observedLogs.All()[expectedWarnings].Message) expectedWarnings++ } if tt.metricsSet == testDataSetDefault || tt.metricsSet == testDataSetAll { - assert.Equal(t, "[WARNING] `k8s.node.cpu.utilization` should not be enabled: WARNING: This metric will be disabled in a future release. Use metric k8s.node.cpu.usage instead.", observedLogs.All()[expectedWarnings].Message) + assert.Equal(t, "[WARNING] `k8s.node.cpu.utilization` should not be enabled: This metric will be disabled in a future release. Use metric k8s.node.cpu.usage instead.", observedLogs.All()[expectedWarnings].Message) expectedWarnings++ } if tt.metricsSet == testDataSetDefault || tt.metricsSet == testDataSetAll { diff --git a/receiver/kubeletstatsreceiver/metadata.yaml b/receiver/kubeletstatsreceiver/metadata.yaml index 67b7c362221a..5f093e30ba7c 100644 --- a/receiver/kubeletstatsreceiver/metadata.yaml +++ b/receiver/kubeletstatsreceiver/metadata.yaml @@ -92,7 +92,7 @@ metrics: enabled: true description: "Node CPU utilization" warnings: - if_enabled: "WARNING: This metric will be disabled in a future release. Use metric k8s.node.cpu.usage instead." + if_enabled: "This metric will be disabled in a future release. Use metric k8s.node.cpu.usage instead." unit: "1" gauge: value_type: double @@ -364,7 +364,7 @@ metrics: enabled: true description: "Container CPU utilization" warnings: - if_enabled: "WARNING: This metric will be disabled in a future release. Use metric container.cpu.usage instead." + if_enabled: "This metric will be disabled in a future release. Use metric container.cpu.usage instead." unit: "1" gauge: value_type: double diff --git a/receiver/lokireceiver/go.mod b/receiver/lokireceiver/go.mod index 6faaeeb3a676..4ed3d114888e 100644 --- a/receiver/lokireceiver/go.mod +++ b/receiver/lokireceiver/go.mod @@ -21,7 +21,7 @@ require ( go.opentelemetry.io/collector/consumer v0.110.0 go.opentelemetry.io/collector/receiver v0.110.0 go.uber.org/zap v1.27.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 ) require ( @@ -59,9 +59,9 @@ require ( github.com/mostynb/go-grpc-compression v1.2.3 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_golang v1.20.3 // indirect + github.com/prometheus/client_golang v1.20.4 // indirect github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.59.1 // indirect + github.com/prometheus/common v0.60.0 // indirect github.com/prometheus/procfs v0.15.1 // indirect github.com/prometheus/prometheus v0.54.1 // indirect github.com/rs/cors v1.11.1 // indirect diff --git a/receiver/lokireceiver/go.sum b/receiver/lokireceiver/go.sum index 04a60b2d0e30..fa45b02629f8 100644 --- a/receiver/lokireceiver/go.sum +++ b/receiver/lokireceiver/go.sum @@ -100,12 +100,12 @@ github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjL github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.20.3 h1:oPksm4K8B+Vt35tUhw6GbSNSgVlVSBH0qELP/7u83l4= -github.com/prometheus/client_golang v1.20.3/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= +github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI= +github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= -github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= +github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= +github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc= @@ -215,8 +215,8 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= -golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= 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= @@ -243,8 +243,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/receiver/mongodbatlasreceiver/alerts_test.go b/receiver/mongodbatlasreceiver/alerts_test.go index 95736392f955..df70651517cb 100644 --- a/receiver/mongodbatlasreceiver/alerts_test.go +++ b/receiver/mongodbatlasreceiver/alerts_test.go @@ -163,9 +163,8 @@ func TestPayloadToLogRecord(t *testing.T) { t.Run(tc.name, func(t *testing.T) { logs, err := payloadToLogs(now, []byte(tc.payload)) if tc.expectedErr != "" { - require.Error(t, err) require.Nil(t, logs) - require.Contains(t, err.Error(), tc.expectedErr) + require.ErrorContains(t, err, tc.expectedErr) } else { require.NoError(t, err) require.NotNil(t, logs) @@ -240,8 +239,7 @@ func TestVerifyHMACSignature(t *testing.T) { t.Run(tc.name, func(t *testing.T) { err := verifyHMACSignature(tc.secret, tc.payload, tc.signatureHeader) if tc.expectedErr != "" { - require.Error(t, err) - require.Contains(t, err.Error(), tc.expectedErr) + require.ErrorContains(t, err, tc.expectedErr) } else { require.NoError(t, err) } diff --git a/receiver/mongodbatlasreceiver/config_test.go b/receiver/mongodbatlasreceiver/config_test.go index e9ff7777cf5b..a2932e213306 100644 --- a/receiver/mongodbatlasreceiver/config_test.go +++ b/receiver/mongodbatlasreceiver/config_test.go @@ -340,8 +340,7 @@ func TestValidate(t *testing.T) { t.Run(tc.name, func(t *testing.T) { err := tc.input.Validate() if tc.expectedErr != "" { - require.Error(t, err) - require.Contains(t, err.Error(), tc.expectedErr) + require.ErrorContains(t, err, tc.expectedErr) } else { require.NoError(t, err) } diff --git a/receiver/mongodbreceiver/client_test.go b/receiver/mongodbreceiver/client_test.go index 5f4fdc24cd7d..f6ed99ebfcc2 100644 --- a/receiver/mongodbreceiver/client_test.go +++ b/receiver/mongodbreceiver/client_test.go @@ -229,8 +229,7 @@ func TestGetVersionFailures(t *testing.T) { } _, err := client.GetVersion(context.TODO()) - require.Error(t, err) - require.Contains(t, err.Error(), tc.partialError) + require.ErrorContains(t, err, tc.partialError) }) } diff --git a/receiver/mongodbreceiver/config_test.go b/receiver/mongodbreceiver/config_test.go index 011283d5c476..b5c3bced8297 100644 --- a/receiver/mongodbreceiver/config_test.go +++ b/receiver/mongodbreceiver/config_test.go @@ -94,7 +94,7 @@ func TestValidate(t *testing.T) { if tc.expected == nil { require.NoError(t, err) } else { - require.Contains(t, err.Error(), tc.expected.Error()) + require.ErrorContains(t, err, tc.expected.Error()) } }) } diff --git a/receiver/mongodbreceiver/go.mod b/receiver/mongodbreceiver/go.mod index ae2b9e1ef0f1..eba9a785b4f7 100644 --- a/receiver/mongodbreceiver/go.mod +++ b/receiver/mongodbreceiver/go.mod @@ -10,7 +10,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.110.0 github.com/stretchr/testify v1.9.0 github.com/testcontainers/testcontainers-go v0.31.0 - go.mongodb.org/mongo-driver v1.17.0 + go.mongodb.org/mongo-driver v1.17.1 go.opentelemetry.io/collector/component v0.110.0 go.opentelemetry.io/collector/config/confignet v1.16.0 go.opentelemetry.io/collector/config/configopaque v1.16.0 diff --git a/receiver/mongodbreceiver/go.sum b/receiver/mongodbreceiver/go.sum index 9429f5c2f50a..8d09e8b01034 100644 --- a/receiver/mongodbreceiver/go.sum +++ b/receiver/mongodbreceiver/go.sum @@ -147,8 +147,8 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0= github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.mongodb.org/mongo-driver v1.17.0 h1:Hp4q2MCjvY19ViwimTs00wHi7G4yzxh4/2+nTx8r40k= -go.mongodb.org/mongo-driver v1.17.0/go.mod h1:wwWm/+BuOddhcq3n68LKRmgk2wXzmF6s0SFOa0GINL4= +go.mongodb.org/mongo-driver v1.17.1 h1:Wic5cJIwJgSpBhe3lx3+/RybR5PiYRMpVFgO7cOHyIM= +go.mongodb.org/mongo-driver v1.17.1/go.mod h1:wwWm/+BuOddhcq3n68LKRmgk2wXzmF6s0SFOa0GINL4= go.opentelemetry.io/collector/component v0.110.0 h1:z7uSY/1dcK+vTY2z3v0XxeCoi2wqgHTow/ds3Gozuz4= go.opentelemetry.io/collector/component v0.110.0/go.mod h1:W99gZdfGtQ5Zg6Bhrwrcl/uZcCG+2qBnZ1z2JO5WCW0= go.opentelemetry.io/collector/component/componentprofiles v0.110.0 h1:YH43aYKPYfnC0TqgI+WlbHsJkTvQPO3ImJybK3oyxQ8= diff --git a/receiver/opencensusreceiver/go.mod b/receiver/opencensusreceiver/go.mod index 0ca392ee1c5f..d987d44f2766 100644 --- a/receiver/opencensusreceiver/go.mod +++ b/receiver/opencensusreceiver/go.mod @@ -27,7 +27,7 @@ require ( go.opentelemetry.io/otel/sdk v1.30.0 go.opentelemetry.io/otel/trace v1.30.0 go.uber.org/goleak v1.3.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 google.golang.org/protobuf v1.34.2 ) diff --git a/receiver/opencensusreceiver/go.sum b/receiver/opencensusreceiver/go.sum index c7250732ea72..436b69d7cdc0 100644 --- a/receiver/opencensusreceiver/go.sum +++ b/receiver/opencensusreceiver/go.sum @@ -243,8 +243,8 @@ google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyac google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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 v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/receiver/otelarrowreceiver/go.mod b/receiver/otelarrowreceiver/go.mod index e2a2b7875d44..1c3b48b6c183 100644 --- a/receiver/otelarrowreceiver/go.mod +++ b/receiver/otelarrowreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/grpcutil v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.110.0 - github.com/open-telemetry/otel-arrow v0.26.0 + github.com/open-telemetry/otel-arrow v0.27.0 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/client v1.16.0 go.opentelemetry.io/collector/component v0.110.0 @@ -31,7 +31,7 @@ require ( go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 golang.org/x/net v0.29.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 google.golang.org/protobuf v1.34.2 ) diff --git a/receiver/otelarrowreceiver/go.sum b/receiver/otelarrowreceiver/go.sum index 385ae83cb5a0..96cfb673d125 100644 --- a/receiver/otelarrowreceiver/go.sum +++ b/receiver/otelarrowreceiver/go.sum @@ -83,8 +83,8 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/mostynb/go-grpc-compression v1.2.3 h1:42/BKWMy0KEJGSdWvzqIyOZ95YcR9mLPqKctH7Uo//I= github.com/mostynb/go-grpc-compression v1.2.3/go.mod h1:AghIxF3P57umzqM9yz795+y1Vjs47Km/Y2FE6ouQ7Lg= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/open-telemetry/otel-arrow v0.26.0 h1:zizyFFtYfVzkjXGtY5iFSR5ognddzwJlD8fGPsVgCLo= -github.com/open-telemetry/otel-arrow v0.26.0/go.mod h1:QGueLcxK3nVjRnVCevyyeCEnI2YkFqgT/TWgw58eVy4= +github.com/open-telemetry/otel-arrow v0.27.0 h1:dxEaCM1epON+iauCNvju/uxeChLwz5u4ifAY3BdjWFU= +github.com/open-telemetry/otel-arrow v0.27.0/go.mod h1:QGueLcxK3nVjRnVCevyyeCEnI2YkFqgT/TWgw58eVy4= 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= @@ -243,8 +243,8 @@ gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6d gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 h1:pPJltXNxVzT4pK9yD8vR9X75DaWYYmLGMsEvBfFQZzQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/receiver/otelarrowreceiver/internal/arrow/arrow_test.go b/receiver/otelarrowreceiver/internal/arrow/arrow_test.go index 11621acbba5c..9a11185ee24a 100644 --- a/receiver/otelarrowreceiver/internal/arrow/arrow_test.go +++ b/receiver/otelarrowreceiver/internal/arrow/arrow_test.go @@ -591,8 +591,7 @@ func TestReceiverRecvError(t *testing.T) { ctc.putBatch(nil, fmt.Errorf("test recv error")) err := ctc.wait() - require.Error(t, err) - require.Contains(t, err.Error(), "test recv error") + require.ErrorContains(t, err, "test recv error") } func TestReceiverSendError(t *testing.T) { diff --git a/receiver/podmanreceiver/podman_test.go b/receiver/podmanreceiver/podman_test.go index c7523936778a..3cb648587ef8 100644 --- a/receiver/podmanreceiver/podman_test.go +++ b/receiver/podmanreceiver/podman_test.go @@ -92,8 +92,7 @@ func TestWatchingTimeouts(t *testing.T) { defer fetchCancel() container, err := cli.fetchContainerStats(ctx, container{}) - require.Error(t, err) - assert.Contains(t, err.Error(), expectedError) + assert.ErrorContains(t, err, expectedError) assert.Empty(t, container) assert.GreaterOrEqual( diff --git a/receiver/prometheusreceiver/go.mod b/receiver/prometheusreceiver/go.mod index 137c4ea84c73..d94653e67de8 100644 --- a/receiver/prometheusreceiver/go.mod +++ b/receiver/prometheusreceiver/go.mod @@ -11,7 +11,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.110.0 github.com/prometheus/client_golang v1.20.4 - github.com/prometheus/common v0.59.1 + github.com/prometheus/common v0.60.0 github.com/prometheus/prometheus v0.54.1 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.110.0 @@ -217,7 +217,7 @@ require ( golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/mod v0.19.0 // indirect golang.org/x/net v0.29.0 // indirect - golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.25.0 // indirect golang.org/x/term v0.24.0 // indirect diff --git a/receiver/prometheusreceiver/go.sum b/receiver/prometheusreceiver/go.sum index 417b0f6f539c..17b47c29b629 100644 --- a/receiver/prometheusreceiver/go.sum +++ b/receiver/prometheusreceiver/go.sum @@ -482,8 +482,8 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= -github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= +github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= +github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -802,8 +802,8 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/receiver/prometheusreceiver/internal/transaction_test.go b/receiver/prometheusreceiver/internal/transaction_test.go index 6b72d14d2422..f15b06e402cb 100644 --- a/receiver/prometheusreceiver/internal/transaction_test.go +++ b/receiver/prometheusreceiver/internal/transaction_test.go @@ -305,8 +305,7 @@ func testTransactionAppendDuplicateLabels(t *testing.T, enableNativeHistograms b ) _, err := tr.Append(0, dupLabels, 1917, 1.0) - require.Error(t, err) - assert.Contains(t, err.Error(), `invalid sample: non-unique label names: "a"`) + assert.ErrorContains(t, err, `invalid sample: non-unique label names: "a"`) } func TestTransactionAppendHistogramNoLe(t *testing.T) { @@ -539,8 +538,7 @@ func testAppendExemplarWithDuplicateLabels(t *testing.T, enableNativeHistograms "a", "c", ) _, err := tr.AppendExemplar(0, labels, exemplar.Exemplar{Value: 0}) - require.Error(t, err) - assert.Contains(t, err.Error(), `invalid sample: non-unique label names: "a"`) + assert.ErrorContains(t, err, `invalid sample: non-unique label names: "a"`) } func TestAppendExemplarWithoutAddingMetric(t *testing.T) { diff --git a/receiver/prometheusremotewritereceiver/Makefile b/receiver/prometheusremotewritereceiver/Makefile new file mode 100644 index 000000000000..c1496226e590 --- /dev/null +++ b/receiver/prometheusremotewritereceiver/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common \ No newline at end of file diff --git a/receiver/prometheusremotewritereceiver/README.md b/receiver/prometheusremotewritereceiver/README.md new file mode 100644 index 000000000000..8e85e04f59f2 --- /dev/null +++ b/receiver/prometheusremotewritereceiver/README.md @@ -0,0 +1,10 @@ + +| 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%2Fprometheusremotewrite%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Fprometheusremotewrite) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Fprometheusremotewrite%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Fprometheusremotewrite) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@dashpole](https://www.github.com/dashpole), [@ArthurSens](https://www.github.com/ArthurSens) | + +[development]: https://github.com/open-telemetry/opentelemetry-collector#development + diff --git a/receiver/prometheusremotewritereceiver/config.go b/receiver/prometheusremotewritereceiver/config.go new file mode 100644 index 000000000000..a09bd185587e --- /dev/null +++ b/receiver/prometheusremotewritereceiver/config.go @@ -0,0 +1,18 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package prometheusremotewritereceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusremotewritereceiver" + +import ( + "go.opentelemetry.io/collector/component" +) + +// Config holds common fields and embedded protocol-specific configurations +type Config struct{} + +var _ component.Config = (*Config)(nil) + +// Validate checks the receiver configuration is valid +func (cfg *Config) Validate() error { + return nil +} diff --git a/receiver/prometheusremotewritereceiver/factory.go b/receiver/prometheusremotewritereceiver/factory.go new file mode 100644 index 000000000000..b10382220dbc --- /dev/null +++ b/receiver/prometheusremotewritereceiver/factory.go @@ -0,0 +1,37 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package prometheusremotewritereceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusremotewritereceiver" + +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/prometheusremotewritereceiver/internal/metadata" +) + +// NewFactory creates a new Prometheus receiver factory. +func NewFactory() receiver.Factory { + return receiver.NewFactory( + metadata.Type, + createDefaultConfig, + receiver.WithMetrics(createMetricsReceiver, metadata.MetricsStability)) +} + +func createDefaultConfig() component.Config { + return &Config{} +} + +// createMetrics creates a metrics receiver based on provided config. +func createMetricsReceiver( + _ context.Context, + set receiver.Settings, + cfg component.Config, + nextConsumer consumer.Metrics, +) (receiver.Metrics, error) { + rCfg := cfg.(*Config) + return newRemoteWriteReceiver(set, rCfg, nextConsumer) +} diff --git a/receiver/prometheusremotewritereceiver/go.mod b/receiver/prometheusremotewritereceiver/go.mod new file mode 100644 index 000000000000..e86045ed0435 --- /dev/null +++ b/receiver/prometheusremotewritereceiver/go.mod @@ -0,0 +1,33 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusremotewritereceiver + +go 1.22.0 + +require ( + go.opentelemetry.io/collector/component v0.110.0 + go.opentelemetry.io/collector/consumer v0.110.0 + go.opentelemetry.io/collector/receiver v0.110.0 + go.uber.org/zap v1.27.0 +) + +require ( + github.com/gogo/protobuf v1.3.2 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.110.0 // indirect + go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 // indirect + go.opentelemetry.io/collector/internal/globalsignal v0.110.0 // indirect + go.opentelemetry.io/collector/pdata v1.16.0 // indirect + go.opentelemetry.io/collector/pdata/pprofile v0.110.0 // indirect + go.opentelemetry.io/collector/pipeline v0.110.0 // indirect + go.opentelemetry.io/otel v1.30.0 // indirect + go.opentelemetry.io/otel/metric v1.30.0 // indirect + go.opentelemetry.io/otel/trace v1.30.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sys v0.25.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.66.2 // indirect + google.golang.org/protobuf v1.34.2 // indirect +) diff --git a/receiver/prometheusremotewritereceiver/go.sum b/receiver/prometheusremotewritereceiver/go.sum new file mode 100644 index 000000000000..ebe7a42b3efd --- /dev/null +++ b/receiver/prometheusremotewritereceiver/go.sum @@ -0,0 +1,100 @@ +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.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/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/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/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= +github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +go.opentelemetry.io/collector/component v0.110.0 h1:z7uSY/1dcK+vTY2z3v0XxeCoi2wqgHTow/ds3Gozuz4= +go.opentelemetry.io/collector/component v0.110.0/go.mod h1:W99gZdfGtQ5Zg6Bhrwrcl/uZcCG+2qBnZ1z2JO5WCW0= +go.opentelemetry.io/collector/config/configtelemetry v0.110.0 h1:V8Y/Xv7TJpnNGHLrheRKrMydcKBxWYAZ+dj71Kllyos= +go.opentelemetry.io/collector/config/configtelemetry v0.110.0/go.mod h1:R0MBUxjSMVMIhljuDHWIygzzJWQyZHXXWIgQNxcFwhc= +go.opentelemetry.io/collector/consumer v0.110.0 h1:CnB83KSFQxhFAbNJwTM0blahg16xa6CyUnIIA5qPMbA= +go.opentelemetry.io/collector/consumer v0.110.0/go.mod h1:WlzhfwDfwKkEa5XFdN5x9+jjp9ZF5EUSmtOgVe69zm0= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0 h1:KlEGGPFmQN7CFbj8pkiD9J6L820kJgC0zYKqeSFGLEo= +go.opentelemetry.io/collector/consumer/consumerprofiles v0.110.0/go.mod h1:Br4qElhLqAYDMddroNox3CpNv+NxgPgNfGhxFXXxYIw= +go.opentelemetry.io/collector/consumer/consumertest v0.110.0 h1:/rOL4sJr4eSzOp5z6+R7MmuJ5UD6PFOs7S2FA7puE1g= +go.opentelemetry.io/collector/consumer/consumertest v0.110.0/go.mod h1:sKL3UwB6nyH/33JE173o755ekYPwlS/8fs8opTSgPiY= +go.opentelemetry.io/collector/internal/globalsignal v0.110.0 h1:S6bfFEiek8vJeXAbciWS7W8UR6ZrVJB3ftNyFTMHQaY= +go.opentelemetry.io/collector/internal/globalsignal v0.110.0/go.mod h1:GqMXodPWOxK5uqpX8MaMXC2389y2XJTa5nPwf8FYDK8= +go.opentelemetry.io/collector/pdata v1.16.0 h1:g02K8jlRnmQ7TQDuXpdgVL6vIxIVqr5Gbb1qIR27rto= +go.opentelemetry.io/collector/pdata v1.16.0/go.mod h1:YZZJIt2ehxosYf/Y1pbvexjNWsIGNNrzzlCTO9jC1F4= +go.opentelemetry.io/collector/pdata/pprofile v0.110.0 h1:DknuOGOdjYIzVnromhVcW5rWyyjPahf65UAfgXz1xfo= +go.opentelemetry.io/collector/pdata/pprofile v0.110.0/go.mod h1:B3GxiEt40ixeGq2r30AOB3dgKdC281rLw39IqgSTwSM= +go.opentelemetry.io/collector/pipeline v0.110.0 h1:nArQj8lt2R6ajbbmZ0f7JqkzAzvIOSwxsxDEv9HGKHw= +go.opentelemetry.io/collector/pipeline v0.110.0/go.mod h1:qWk90kohDYBgI/1Kw4DQaQU82+y9GJY8MDse7H2JTWg= +go.opentelemetry.io/collector/receiver v0.110.0 h1:uv+mCadEpWT7yoRvMil1bY44aZbZ7y4oAqsjvypf+t4= +go.opentelemetry.io/collector/receiver v0.110.0/go.mod h1:rTNskk6R+8bU4dlAB1IgdwkIiBl44+C6qcvdyarAyF0= +go.opentelemetry.io/otel v1.30.0 h1:F2t8sK4qf1fAmY9ua4ohFS/K+FUuOPemHUIXHtktrts= +go.opentelemetry.io/otel v1.30.0/go.mod h1:tFw4Br9b7fOS+uEao81PJjVMjW/5fvNCbpsDIXqP0pc= +go.opentelemetry.io/otel/metric v1.30.0 h1:4xNulvn9gjzo4hjg+wzIKG7iNFEaBMX00Qd4QIZs7+w= +go.opentelemetry.io/otel/metric v1.30.0/go.mod h1:aXTfST94tswhWEb+5QjlSqG+cZlmyXy/u8jFpor3WqQ= +go.opentelemetry.io/otel/trace v1.30.0 h1:7UBkkYzeg3C7kQX8VAidWh2biiQbtAKjyIML8dQ9wmc= +go.opentelemetry.io/otel/trace v1.30.0/go.mod h1:5EyKqTzzmyqB9bwtCCq6pDLktPK6fmGf/Dph+8VI02o= +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.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.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.66.2 h1:3QdXkuq3Bkh7w+ywLdLvM56cmGvQHUMZpiCzt6Rqaoo= +google.golang.org/grpc v1.66.2/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= +google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= +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/prometheusremotewritereceiver/internal/metadata/generated_status.go b/receiver/prometheusremotewritereceiver/internal/metadata/generated_status.go new file mode 100644 index 000000000000..a62550fe69aa --- /dev/null +++ b/receiver/prometheusremotewritereceiver/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("prometheusremotewrite") + ScopeName = "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver" +) + +const ( + MetricsStability = component.StabilityLevelDevelopment +) diff --git a/receiver/prometheusremotewritereceiver/metadata.yaml b/receiver/prometheusremotewritereceiver/metadata.yaml new file mode 100644 index 000000000000..b33a1f28b963 --- /dev/null +++ b/receiver/prometheusremotewritereceiver/metadata.yaml @@ -0,0 +1,11 @@ +type: prometheusremotewrite + +status: + class: receiver + stability: + development: [metrics] + distributions: [] + codeowners: + active: [dashpole, ArthurSens] +tests: + config: \ No newline at end of file diff --git a/receiver/prometheusremotewritereceiver/receiver.go b/receiver/prometheusremotewritereceiver/receiver.go new file mode 100644 index 000000000000..c9b6d232b0be --- /dev/null +++ b/receiver/prometheusremotewritereceiver/receiver.go @@ -0,0 +1,32 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package prometheusremotewritereceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusremotewritereceiver" + +import ( + "context" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/receiver" + "go.uber.org/zap" +) + +func newRemoteWriteReceiver(_ receiver.Settings, _ *Config, _ consumer.Metrics) (receiver.Metrics, error) { + panic("need implement") +} + +// nolint +type prometheusRemoteWriteReceiver struct { + settings receiver.Settings //nolint:unused + host component.Host //nolint:unused + nextConsumer consumer.Metrics //nolint:unused + + config *Config //nolint:unused + logger *zap.Logger //nolint:unused +} + +// nolint +func (prwc *prometheusRemoteWriteReceiver) Start(_ context.Context, _ component.Host) error { + panic("need implement") +} diff --git a/receiver/pulsarreceiver/go.mod b/receiver/pulsarreceiver/go.mod index a2f62dd2d427..1268a838c0be 100644 --- a/receiver/pulsarreceiver/go.mod +++ b/receiver/pulsarreceiver/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/pulsar go 1.22.0 require ( - github.com/apache/pulsar-client-go v0.13.1 + github.com/apache/pulsar-client-go v0.14.0 github.com/apache/thrift v0.21.0 github.com/gogo/protobuf v1.3.2 github.com/jaegertracing/jaeger v1.61.0 diff --git a/receiver/pulsarreceiver/go.sum b/receiver/pulsarreceiver/go.sum index 3e7c32af6668..6d0b04220584 100644 --- a/receiver/pulsarreceiver/go.sum +++ b/receiver/pulsarreceiver/go.sum @@ -15,8 +15,8 @@ github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERo github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/Microsoft/hcsshim v0.11.5 h1:haEcLNpj9Ka1gd3B3tAEs9CpE0c+1IhoL59w/exYU38= github.com/Microsoft/hcsshim v0.11.5/go.mod h1:MV8xMfmECjl5HdO7U/3/hFVnkmSBjAjmA09d4bExKcU= -github.com/apache/pulsar-client-go v0.13.1 h1:XAAKXjF99du7LP6qu/nBII1HC2nS483/vQoQIWmm5Yg= -github.com/apache/pulsar-client-go v0.13.1/go.mod h1:0X5UCs+Cv5w6Ds38EZebUMfyVUFIh+URF2BeipEVhIU= +github.com/apache/pulsar-client-go v0.14.0 h1:P7yfAQhQ52OCAu8yVmtdbNQ81vV8bF54S2MLmCPJC9w= +github.com/apache/pulsar-client-go v0.14.0/go.mod h1:PNUE29x9G1EHMvm41Bs2vcqwgv7N8AEjeej+nEVYbX8= github.com/apache/thrift v0.21.0 h1:tdPmh/ptjE1IJnhbhrcl2++TauVjy242rkV/UzJChnE= github.com/apache/thrift v0.21.0/go.mod h1:W1H8aR/QRtYNvrPeFXBtobyRkd0/YVhTc6i07XIAgDw= github.com/ardielle/ardielle-go v1.5.2 h1:TilHTpHIQJ27R1Tl/iITBzMwiUGSlVfiVhwDNGM3Zj4= @@ -50,8 +50,8 @@ github.com/dimfeld/httptreemux v5.0.1+incompatible h1:Qj3gVcDNoOthBAqftuD596rm4w github.com/dimfeld/httptreemux v5.0.1+incompatible/go.mod h1:rbUlSV+CCpv/SuqUTP/8Bk2O3LyUV436/yaRGkhP6Z0= github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= -github.com/docker/docker v27.0.3+incompatible h1:aBGI9TeQ4MPlhquTQKq9XbK79rKFVwXNUAYz9aXyEBE= -github.com/docker/docker v27.0.3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.1.1+incompatible h1:hO/M4MtV36kzKldqnA37IWhebRA+LnqqcqDja6kVaKY= +github.com/docker/docker v27.1.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= diff --git a/receiver/purefareceiver/go.mod b/receiver/purefareceiver/go.mod index 4c50b8dba035..c1bae0f8aee3 100644 --- a/receiver/purefareceiver/go.mod +++ b/receiver/purefareceiver/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.110.0 - github.com/prometheus/common v0.59.1 + github.com/prometheus/common v0.60.0 github.com/prometheus/prometheus v0.54.1 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.110.0 @@ -164,7 +164,7 @@ require ( golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/mod v0.19.0 // indirect golang.org/x/net v0.29.0 // indirect - golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.25.0 // indirect golang.org/x/term v0.24.0 // indirect @@ -174,7 +174,7 @@ require ( google.golang.org/api v0.188.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/grpc v1.67.0 // indirect + google.golang.org/grpc v1.67.1 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/receiver/purefareceiver/go.sum b/receiver/purefareceiver/go.sum index 46c46aa0fa69..50c92d1fd1ad 100644 --- a/receiver/purefareceiver/go.sum +++ b/receiver/purefareceiver/go.sum @@ -481,8 +481,8 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= -github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= +github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= +github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -796,8 +796,8 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1022,8 +1022,8 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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 v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/receiver/purefbreceiver/go.mod b/receiver/purefbreceiver/go.mod index 72f0bcbaa564..c277889d5793 100644 --- a/receiver/purefbreceiver/go.mod +++ b/receiver/purefbreceiver/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.110.0 - github.com/prometheus/common v0.59.1 + github.com/prometheus/common v0.60.0 github.com/prometheus/prometheus v0.54.1 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.110.0 @@ -164,7 +164,7 @@ require ( golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/mod v0.19.0 // indirect golang.org/x/net v0.29.0 // indirect - golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.25.0 // indirect golang.org/x/term v0.24.0 // indirect @@ -174,7 +174,7 @@ require ( google.golang.org/api v0.188.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect - google.golang.org/grpc v1.67.0 // indirect + google.golang.org/grpc v1.67.1 // indirect google.golang.org/protobuf v1.34.2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect diff --git a/receiver/purefbreceiver/go.sum b/receiver/purefbreceiver/go.sum index 46c46aa0fa69..50c92d1fd1ad 100644 --- a/receiver/purefbreceiver/go.sum +++ b/receiver/purefbreceiver/go.sum @@ -481,8 +481,8 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= -github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= +github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= +github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -796,8 +796,8 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1022,8 +1022,8 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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 v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/receiver/rabbitmqreceiver/client_test.go b/receiver/rabbitmqreceiver/client_test.go index e6be65b156d6..8952e8792297 100644 --- a/receiver/rabbitmqreceiver/client_test.go +++ b/receiver/rabbitmqreceiver/client_test.go @@ -74,7 +74,7 @@ func TestNewClient(t *testing.T) { ac, err := newClient(context.Background(), tc.cfg, tc.host, tc.settings, tc.logger) if tc.expectError != nil { require.Nil(t, ac) - require.Contains(t, err.Error(), tc.expectError.Error()) + require.ErrorContains(t, err, tc.expectError.Error()) } else { require.NoError(t, err) @@ -126,7 +126,7 @@ func TestGetQueuesDetails(t *testing.T) { clusters, err := tc.GetQueues(context.Background()) require.Nil(t, clusters) - require.Contains(t, err.Error(), "failed to decode response payload") + require.ErrorContains(t, err, "failed to decode response payload") }, }, { diff --git a/receiver/receivercreator/config_test.go b/receiver/receivercreator/config_test.go index c58700c35cfc..2e491053edbe 100644 --- a/receiver/receivercreator/config_test.go +++ b/receiver/receivercreator/config_test.go @@ -147,7 +147,7 @@ func TestInvalidResourceAttributeEndpointType(t *testing.T) { // https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/33594 // nolint:staticcheck cfg, err := otelcoltest.LoadConfigAndValidate(filepath.Join("testdata", "invalid-resource-attributes.yaml"), factories) - require.Contains(t, err.Error(), "error reading configuration for \"receiver_creator\": resource attributes for unsupported endpoint type \"not.a.real.type\"") + require.ErrorContains(t, err, "error reading configuration for \"receiver_creator\": resource attributes for unsupported endpoint type \"not.a.real.type\"") require.Nil(t, cfg) } @@ -162,7 +162,7 @@ func TestInvalidReceiverResourceAttributeValueType(t *testing.T) { // https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/33594 // nolint:staticcheck cfg, err := otelcoltest.LoadConfigAndValidate(filepath.Join("testdata", "invalid-receiver-resource-attributes.yaml"), factories) - require.Contains(t, err.Error(), "error reading configuration for \"receiver_creator\": unsupported `resource_attributes` \"one\" value in examplereceiver/1") + require.ErrorContains(t, err, "error reading configuration for \"receiver_creator\": unsupported `resource_attributes` \"one\" value in examplereceiver/1") require.Nil(t, cfg) } diff --git a/receiver/redisreceiver/redis_scraper_test.go b/receiver/redisreceiver/redis_scraper_test.go index 4429502190b6..616f975768ef 100644 --- a/receiver/redisreceiver/redis_scraper_test.go +++ b/receiver/redisreceiver/redis_scraper_test.go @@ -39,8 +39,7 @@ func TestRedisRunnable(t *testing.T) { func TestNewReceiver_invalid_endpoint(t *testing.T) { c := createDefaultConfig().(*Config) _, err := createMetricsReceiver(context.Background(), receivertest.NewNopSettings(), c, nil) - assert.Error(t, err) - assert.Contains(t, err.Error(), "invalid endpoint") + assert.ErrorContains(t, err, "invalid endpoint") } func TestNewReceiver_invalid_auth_error(t *testing.T) { @@ -51,7 +50,6 @@ func TestNewReceiver_invalid_auth_error(t *testing.T) { }, } r, err := createMetricsReceiver(context.Background(), receivertest.NewNopSettings(), c, nil) - assert.Error(t, err) - assert.Contains(t, err.Error(), "failed to load TLS config") + assert.ErrorContains(t, err, "failed to load TLS config") assert.Nil(t, r) } diff --git a/receiver/riakreceiver/client_test.go b/receiver/riakreceiver/client_test.go index 9ebe35826978..6730fc71cccc 100644 --- a/receiver/riakreceiver/client_test.go +++ b/receiver/riakreceiver/client_test.go @@ -64,7 +64,7 @@ func TestNewClient(t *testing.T) { ac, err := newClient(context.Background(), tc.cfg, componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings(), zap.NewNop()) if tc.expectError != nil { require.Nil(t, ac) - require.Contains(t, err.Error(), tc.expectError.Error()) + require.ErrorContains(t, err, tc.expectError.Error()) } else { require.NoError(t, err) diff --git a/receiver/saphanareceiver/client_test.go b/receiver/saphanareceiver/client_test.go index 802650a93e82..045a7011f884 100644 --- a/receiver/saphanareceiver/client_test.go +++ b/receiver/saphanareceiver/client_test.go @@ -211,7 +211,7 @@ func TestNullOutput(t *testing.T) { results, err := client.collectDataFromQuery(context.TODO(), query) // Error expected for second row, but data is also returned - require.Contains(t, err.Error(), "database row NULL value for required metric label id") + require.ErrorContains(t, err, "database row NULL value for required metric label id") require.Equal(t, []map[string]string{ { "id": "my_id", diff --git a/receiver/signalfxreceiver/go.mod b/receiver/signalfxreceiver/go.mod index c308decd5411..24ab3b4b6c07 100644 --- a/receiver/signalfxreceiver/go.mod +++ b/receiver/signalfxreceiver/go.mod @@ -30,6 +30,7 @@ require ( github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/ebitengine/purego v0.8.0 // indirect github.com/elastic/lunes v0.1.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect @@ -61,8 +62,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/rs/cors v1.11.1 // indirect - github.com/shirou/gopsutil/v4 v4.24.8 // indirect - github.com/shoenig/go-m1cpu v0.1.6 // indirect + github.com/shirou/gopsutil/v4 v4.24.9 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/yusufpapurcu/wmi v1.2.4 // indirect diff --git a/receiver/signalfxreceiver/go.sum b/receiver/signalfxreceiver/go.sum index e51eab6e5c5b..8b5a028dd454 100644 --- a/receiver/signalfxreceiver/go.sum +++ b/receiver/signalfxreceiver/go.sum @@ -5,6 +5,8 @@ github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL 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/ebitengine/purego v0.8.0 h1:JbqvnEzRvPpxhCJzJJ2y0RbiZ8nyjccVUrSM3q+GvvE= +github.com/ebitengine/purego v0.8.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/elastic/lunes v0.1.0 h1:amRtLPjwkWtzDF/RKzcEPMvSsSseLDLW+bnhfNSLRe4= github.com/elastic/lunes v0.1.0/go.mod h1:xGphYIt3XdZRtyWosHQTErsQTd4OP1p9wsbVoHelrd4= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= @@ -84,12 +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/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.8 h1:pVQjIenQkIhqO81mwTaXjTzOMT7d3TZkf43PlVFHENI= -github.com/shirou/gopsutil/v4 v4.24.8/go.mod h1:wE0OrJtj4dG+hYkxqDH3QiBICdKSf04/npcvLLc/oRg= -github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= -github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= -github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= -github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= +github.com/shirou/gopsutil/v4 v4.24.9 h1:KIV+/HaHD5ka5f570RZq+2SaeFsb/pq+fp2DGNWYoOI= +github.com/shirou/gopsutil/v4 v4.24.9/go.mod h1:3fkaHNeYsUFCGZ8+9vZVWtbyM1k2eRnlL+bWO8Bxa/Q= github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 h1:32k2QLgsKhcEs55q4REPKyIadvid5FPy2+VMgvbmKJ0= github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3/go.mod h1:gJrXWi7wSGXfiC7+VheQaz+ypdCt5SmZNL+BRxUe7y4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/receiver/simpleprometheusreceiver/go.mod b/receiver/simpleprometheusreceiver/go.mod index 950bf011a653..2eb79b9649b6 100644 --- a/receiver/simpleprometheusreceiver/go.mod +++ b/receiver/simpleprometheusreceiver/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.110.0 - github.com/prometheus/common v0.59.1 + github.com/prometheus/common v0.60.0 github.com/prometheus/prometheus v0.54.1 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.110.0 @@ -166,7 +166,7 @@ require ( golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/mod v0.19.0 // indirect golang.org/x/net v0.29.0 // indirect - golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.25.0 // indirect golang.org/x/term v0.24.0 // indirect diff --git a/receiver/simpleprometheusreceiver/go.sum b/receiver/simpleprometheusreceiver/go.sum index f50eeb1dbf6a..7d526eb324bc 100644 --- a/receiver/simpleprometheusreceiver/go.sum +++ b/receiver/simpleprometheusreceiver/go.sum @@ -481,8 +481,8 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= -github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= +github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= +github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -798,8 +798,8 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= diff --git a/receiver/skywalkingreceiver/go.mod b/receiver/skywalkingreceiver/go.mod index 5bcdf06d7b5f..f81c39fb0238 100644 --- a/receiver/skywalkingreceiver/go.mod +++ b/receiver/skywalkingreceiver/go.mod @@ -22,7 +22,7 @@ require ( go.opentelemetry.io/collector/semconv v0.110.0 go.uber.org/goleak v1.3.0 go.uber.org/multierr v1.11.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 google.golang.org/protobuf v1.34.2 skywalking.apache.org/repo/goapi v0.0.0-20240104145220-ba7202308dd4 ) diff --git a/receiver/skywalkingreceiver/go.sum b/receiver/skywalkingreceiver/go.sum index a5afb36618fa..7816a35b2063 100644 --- a/receiver/skywalkingreceiver/go.sum +++ b/receiver/skywalkingreceiver/go.sum @@ -298,8 +298,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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 v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/receiver/snmpreceiver/client_test.go b/receiver/snmpreceiver/client_test.go index b4eb5ffc0eab..8cfb26ad1f09 100644 --- a/receiver/snmpreceiver/client_test.go +++ b/receiver/snmpreceiver/client_test.go @@ -67,7 +67,7 @@ func TestNewClient(t *testing.T) { ac, err := newClient(tc.cfg, tc.logger) if tc.expectError != nil { require.Nil(t, ac) - require.Contains(t, err.Error(), tc.expectError.Error()) + require.ErrorContains(t, err, tc.expectError.Error()) } else { require.NoError(t, err) diff --git a/receiver/snowflakereceiver/config_test.go b/receiver/snowflakereceiver/config_test.go index 6c4421afa0bc..77ccd5ab6480 100644 --- a/receiver/snowflakereceiver/config_test.go +++ b/receiver/snowflakereceiver/config_test.go @@ -97,8 +97,7 @@ func TestValidateConfig(t *testing.T) { t.Parallel() err := test.conf.Validate() - require.Error(t, err) - require.Contains(t, err.Error(), test.expect.Error()) + require.ErrorContains(t, err, test.expect.Error()) }) } } diff --git a/receiver/solacereceiver/go.mod b/receiver/solacereceiver/go.mod index 4deee4eef106..f7ec37802c3f 100644 --- a/receiver/solacereceiver/go.mod +++ b/receiver/solacereceiver/go.mod @@ -6,7 +6,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/solace go 1.22.0 require ( - github.com/Azure/go-amqp v1.1.0 + github.com/Azure/go-amqp v1.2.0 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.110.0 go.opentelemetry.io/collector/config/configopaque v1.16.0 diff --git a/receiver/solacereceiver/go.sum b/receiver/solacereceiver/go.sum index 685d3a67b353..457d23b3adf6 100644 --- a/receiver/solacereceiver/go.sum +++ b/receiver/solacereceiver/go.sum @@ -1,5 +1,5 @@ -github.com/Azure/go-amqp v1.1.0 h1:XUhx5f4lZFVf6LQc5kBUFECW0iJW9VLxKCYrBeGwl0U= -github.com/Azure/go-amqp v1.1.0/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE= +github.com/Azure/go-amqp v1.2.0 h1:NNyfN3/cRszWzMvjmm64yaPZDHX/2DJkowv8Ub9y01I= +github.com/Azure/go-amqp v1.2.0/go.mod h1:vZAogwdrkbyK3Mla8m/CxSc/aKdnTZ4IbPxl51Y5WZE= 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= diff --git a/receiver/solacereceiver/unmarshaller_test.go b/receiver/solacereceiver/unmarshaller_test.go index 72fb828ed5b0..157ec31729f3 100644 --- a/receiver/solacereceiver/unmarshaller_test.go +++ b/receiver/solacereceiver/unmarshaller_test.go @@ -327,8 +327,7 @@ func TestSolaceMessageUnmarshallerUnmarshal(t *testing.T) { u := newTracesUnmarshaller(zap.NewNop(), telemetryBuilder, metricAttr) traces, err := u.unmarshal(tt.message) if tt.err != nil { - require.Error(t, err) - assert.Contains(t, err.Error(), tt.err.Error()) + assert.ErrorContains(t, err, tt.err.Error()) } else { assert.NoError(t, err) } diff --git a/receiver/sqlqueryreceiver/integration_test.go b/receiver/sqlqueryreceiver/integration_test.go index 801625c19f20..7a8bc3ce2455 100644 --- a/receiver/sqlqueryreceiver/integration_test.go +++ b/receiver/sqlqueryreceiver/integration_test.go @@ -125,6 +125,53 @@ func TestPostgresIntegrationLogsTrackingWithoutStorage(t *testing.T) { testAllSimpleLogs(t, consumer.AllLogs()) } +func TestPostgresIntegrationLogsTrackingByTimestampColumnWithoutStorage(t *testing.T) { + // Start Postgres container. + externalPort := "15432" + dbContainer := startPostgresDbContainer(t, externalPort) + defer func() { + require.NoError(t, dbContainer.Terminate(context.Background())) + }() + + // Start the SQL Query receiver. + receiverCreateSettings := receivertest.NewNopSettings() + receiver, config, consumer := createTestLogsReceiverForPostgres(t, externalPort, receiverCreateSettings) + config.CollectionInterval = 100 * time.Millisecond + config.Queries = []sqlquery.Query{ + { + SQL: "select * from simple_logs where insert_time > $1 order by insert_time asc", + Logs: []sqlquery.LogsCfg{ + { + BodyColumn: "body", + AttributeColumns: []string{"attribute"}, + }, + }, + TrackingColumn: "insert_time", + TrackingStartValue: "2022-06-03 21:00:00+00", + }, + } + host := componenttest.NewNopHost() + err := receiver.Start(context.Background(), host) + require.NoError(t, err) + + // Verify there's 5 logs received. + require.Eventuallyf( + t, + func() bool { + return consumer.LogRecordCount() > 0 + }, + 1*time.Minute, + 500*time.Millisecond, + "failed to receive more than 0 logs", + ) + require.Equal(t, 5, consumer.LogRecordCount()) + testAllSimpleLogs(t, consumer.AllLogs()) + + // Stop the SQL Query receiver. + err = receiver.Shutdown(context.Background()) + require.NoError(t, err) +} + func TestPostgresIntegrationLogsTrackingWithStorage(t *testing.T) { // start Postgres container externalPort := "15431" diff --git a/receiver/sqlqueryreceiver/testdata/integration/mysql/init.sql b/receiver/sqlqueryreceiver/testdata/integration/mysql/init.sql index 7c562c635294..e1ac6a2e21ad 100644 --- a/receiver/sqlqueryreceiver/testdata/integration/mysql/init.sql +++ b/receiver/sqlqueryreceiver/testdata/integration/mysql/init.sql @@ -29,7 +29,7 @@ create table simple_logs insert into simple_logs (id, insert_time, body, attribute) values (1, '2022-06-03 21:59:26', '- - - [03/Jun/2022:21:59:26 +0000] "GET /api/health HTTP/1.1" 200 6197 4 "-" "-" 445af8e6c428303f -', 'TLSv1.2'), -(2, '2022-06-03 21:59:26', '- - - [03/Jun/2022:21:59:26 +0000] "GET /api/health HTTP/1.1" 200 6205 5 "-" "-" 3285f43cd4baa202 -', 'TLSv1'), -(3, '2022-06-03 21:59:29', '- - - [03/Jun/2022:21:59:29 +0000] "GET /api/health HTTP/1.1" 200 6233 4 "-" "-" 579e8362d3185b61 -', 'TLSv1.2'), +(2, '2022-06-03 21:59:26.692991', '- - - [03/Jun/2022:21:59:26 +0000] "GET /api/health HTTP/1.1" 200 6205 5 "-" "-" 3285f43cd4baa202 -', 'TLSv1'), +(3, '2022-06-03 21:59:29.212212', '- - - [03/Jun/2022:21:59:29 +0000] "GET /api/health HTTP/1.1" 200 6233 4 "-" "-" 579e8362d3185b61 -', 'TLSv1.2'), (4, '2022-06-03 21:59:31', '- - - [03/Jun/2022:21:59:31 +0000] "GET /api/health HTTP/1.1" 200 6207 5 "-" "-" 8c6ac61ae66e509f -', 'TLSv1'), -(5, '2022-06-03 21:59:31', '- - - [03/Jun/2022:21:59:31 +0000] "GET /api/health HTTP/1.1" 200 6200 4 "-" "-" c163495861e873d8 -', 'TLSv1.2'); +(5, '2022-06-03 21:59:31.332121', '- - - [03/Jun/2022:21:59:31 +0000] "GET /api/health HTTP/1.1" 200 6200 4 "-" "-" c163495861e873d8 -', 'TLSv1.2'); diff --git a/receiver/sqlqueryreceiver/testdata/integration/oracle/init.sql b/receiver/sqlqueryreceiver/testdata/integration/oracle/init.sql index 213f3beebac1..8597cfa846b6 100644 --- a/receiver/sqlqueryreceiver/testdata/integration/oracle/init.sql +++ b/receiver/sqlqueryreceiver/testdata/integration/oracle/init.sql @@ -35,10 +35,10 @@ grant select on simple_logs to otel; insert into simple_logs (id, insert_time, body, attribute) values (1, TIMESTAMP '2022-06-03 21:59:26 +00:00', '- - - [03/Jun/2022:21:59:26 +0000] "GET /api/health HTTP/1.1" 200 6197 4 "-" "-" 445af8e6c428303f -', 'TLSv1.2'); insert into simple_logs (id, insert_time, body, attribute) values -(2, TIMESTAMP '2022-06-03 21:59:26 +00:00', '- - - [03/Jun/2022:21:59:26 +0000] "GET /api/health HTTP/1.1" 200 6205 5 "-" "-" 3285f43cd4baa202 -', 'TLSv1'); +(2, TIMESTAMP '2022-06-03 21:59:26.692991 +00:00', '- - - [03/Jun/2022:21:59:26 +0000] "GET /api/health HTTP/1.1" 200 6205 5 "-" "-" 3285f43cd4baa202 -', 'TLSv1'); insert into simple_logs (id, insert_time, body, attribute) values -(3, TIMESTAMP '2022-06-03 21:59:29 +00:00', '- - - [03/Jun/2022:21:59:29 +0000] "GET /api/health HTTP/1.1" 200 6233 4 "-" "-" 579e8362d3185b61 -', 'TLSv1.2'); +(3, TIMESTAMP '2022-06-03 21:59:29.212212 +00:00', '- - - [03/Jun/2022:21:59:29 +0000] "GET /api/health HTTP/1.1" 200 6233 4 "-" "-" 579e8362d3185b61 -', 'TLSv1.2'); insert into simple_logs (id, insert_time, body, attribute) values (4, TIMESTAMP '2022-06-03 21:59:31 +00:00', '- - - [03/Jun/2022:21:59:31 +0000] "GET /api/health HTTP/1.1" 200 6207 5 "-" "-" 8c6ac61ae66e509f -', 'TLSv1'); insert into simple_logs (id, insert_time, body, attribute) values -(5, TIMESTAMP '2022-06-03 21:59:31 +00:00', '- - - [03/Jun/2022:21:59:31 +0000] "GET /api/health HTTP/1.1" 200 6200 4 "-" "-" c163495861e873d8 -', 'TLSv1.2'); +(5, TIMESTAMP '2022-06-03 21:59:31.332121 +00:00', '- - - [03/Jun/2022:21:59:31 +0000] "GET /api/health HTTP/1.1" 200 6200 4 "-" "-" c163495861e873d8 -', 'TLSv1.2'); diff --git a/receiver/sqlqueryreceiver/testdata/integration/postgresql/init.sql b/receiver/sqlqueryreceiver/testdata/integration/postgresql/init.sql index 0379e43136a6..4ef4274072e5 100644 --- a/receiver/sqlqueryreceiver/testdata/integration/postgresql/init.sql +++ b/receiver/sqlqueryreceiver/testdata/integration/postgresql/init.sql @@ -32,8 +32,8 @@ grant select, insert on simple_logs to otel; insert into simple_logs (id, insert_time, body, attribute) values (1, '2022-06-03 21:59:26+00', '- - - [03/Jun/2022:21:59:26 +0000] "GET /api/health HTTP/1.1" 200 6197 4 "-" "-" 445af8e6c428303f -', 'TLSv1.2'), -(2, '2022-06-03 21:59:26+00', '- - - [03/Jun/2022:21:59:26 +0000] "GET /api/health HTTP/1.1" 200 6205 5 "-" "-" 3285f43cd4baa202 -', 'TLSv1'), -(3, '2022-06-03 21:59:29+00', '- - - [03/Jun/2022:21:59:29 +0000] "GET /api/health HTTP/1.1" 200 6233 4 "-" "-" 579e8362d3185b61 -', 'TLSv1.2'), +(2, '2022-06-03 21:59:26.692991+00', '- - - [03/Jun/2022:21:59:26 +0000] "GET /api/health HTTP/1.1" 200 6205 5 "-" "-" 3285f43cd4baa202 -', 'TLSv1'), +(3, '2022-06-03 21:59:29.212212+00', '- - - [03/Jun/2022:21:59:29 +0000] "GET /api/health HTTP/1.1" 200 6233 4 "-" "-" 579e8362d3185b61 -', 'TLSv1.2'), (4, '2022-06-03 21:59:31+00', '- - - [03/Jun/2022:21:59:31 +0000] "GET /api/health HTTP/1.1" 200 6207 5 "-" "-" 8c6ac61ae66e509f -', 'TLSv1'), -(5, '2022-06-03 21:59:31+00', '- - - [03/Jun/2022:21:59:31 +0000] "GET /api/health HTTP/1.1" 200 6200 4 "-" "-" c163495861e873d8 -', 'TLSv1.2'); +(5, '2022-06-03 21:59:31.332121+00', '- - - [03/Jun/2022:21:59:31 +0000] "GET /api/health HTTP/1.1" 200 6200 4 "-" "-" c163495861e873d8 -', 'TLSv1.2'); diff --git a/receiver/sqlserverreceiver/queries.go b/receiver/sqlserverreceiver/queries.go index 70ed98ad439f..177bbfb2d347 100644 --- a/receiver/sqlserverreceiver/queries.go +++ b/receiver/sqlserverreceiver/queries.go @@ -211,6 +211,7 @@ INSERT INTO @PCounters SELECT * FROM PerfCounters; SELECT 'sqlserver_performance' AS [measurement] ,REPLACE(@@SERVERNAME,'\',':') AS [sql_instance] + ,HOST_NAME() AS [computer_name] ,pc.[object_name] AS [object] ,pc.[counter_name] AS [counter] ,CASE pc.[instance_name] WHEN '_Total' THEN 'Total' ELSE ISNULL(pc.[instance_name],'') END AS [instance] @@ -288,6 +289,7 @@ EXEC [xp_instance_regread] SELECT ''sqlserver_server_properties'' AS [measurement] ,REPLACE(@@SERVERNAME,''\'','':'') AS [sql_instance] + ,HOST_NAME() AS [computer_name] ,@@SERVICENAME AS [service_name] ,si.[cpu_count] ,(SELECT [total_physical_memory_kb] FROM sys.[dm_os_sys_memory]) AS [server_memory] diff --git a/receiver/sqlserverreceiver/scraper.go b/receiver/sqlserverreceiver/scraper.go index ef11b72e1060..487ba5176c63 100644 --- a/receiver/sqlserverreceiver/scraper.go +++ b/receiver/sqlserverreceiver/scraper.go @@ -21,7 +21,10 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver/internal/metadata" ) -const instanceNameKey = "sql_instance" +const ( + computerNameKey = "computer_name" + instanceNameKey = "sql_instance" +) type sqlServerScraperHelper struct { id component.ID @@ -106,7 +109,6 @@ func (s *sqlServerScraperHelper) Shutdown(_ context.Context) error { } func (s *sqlServerScraperHelper) recordDatabaseIOMetrics(ctx context.Context) error { - const computerNameKey = "computer_name" const databaseNameKey = "database_name" const physicalFilenameKey = "physical_filename" const logicalFilenameKey = "logical_filename" @@ -195,6 +197,7 @@ func (s *sqlServerScraperHelper) recordDatabasePerfCounterMetrics(ctx context.Co now := pcommon.NewTimestampFromTime(time.Now()) for i, row := range rows { rb := s.mb.NewResourceBuilder() + rb.SetSqlserverComputerName(row[computerNameKey]) rb.SetSqlserverInstanceName(row[instanceNameKey]) switch row[counterKey] { @@ -283,6 +286,7 @@ func (s *sqlServerScraperHelper) recordDatabaseStatusMetrics(ctx context.Context now := pcommon.NewTimestampFromTime(time.Now()) for _, row := range rows { rb := s.mb.NewResourceBuilder() + rb.SetSqlserverComputerName(row[computerNameKey]) rb.SetSqlserverInstanceName(row[instanceNameKey]) errs = append(errs, s.mb.RecordSqlserverDatabaseCountDataPoint(now, row[dbOnline], metadata.AttributeDatabaseStatusOnline)) diff --git a/receiver/sqlserverreceiver/testdata/perfCounterQueryData.txt b/receiver/sqlserverreceiver/testdata/perfCounterQueryData.txt index 4b9ec5411d96..6057147b8695 100644 --- a/receiver/sqlserverreceiver/testdata/perfCounterQueryData.txt +++ b/receiver/sqlserverreceiver/testdata/perfCounterQueryData.txt @@ -6,6 +6,8 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Access Methods", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", + "computer_name":"abcde", "value":"0" }, { @@ -15,6 +17,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Access Methods", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"14458" }, { @@ -24,6 +27,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Access Methods", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"1.619118e+06" }, { @@ -33,6 +37,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Access Methods", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"871" }, { @@ -42,6 +47,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Access Methods", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -51,6 +57,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Access Methods", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"816" }, { @@ -60,6 +67,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Access Methods", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"895" }, { @@ -69,6 +77,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Availability Replica", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -78,6 +87,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Availability Replica", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -87,6 +97,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Availability Replica", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -96,6 +107,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Availability Replica", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -105,6 +117,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Availability Replica", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -114,6 +127,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Availability Replica", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -123,6 +137,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Availability Replica", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -132,6 +147,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Availability Replica", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -141,6 +157,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Availability Replica", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -150,6 +167,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"1952" }, { @@ -159,6 +177,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"205" }, { @@ -168,6 +187,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"160" }, { @@ -177,6 +197,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"93" }, { @@ -186,6 +207,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"220" }, { @@ -195,6 +217,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"437" }, { @@ -204,6 +227,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"158" }, { @@ -213,6 +237,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"130" }, { @@ -222,6 +247,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"18" }, { @@ -231,6 +257,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"1" }, { @@ -240,6 +267,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -249,6 +277,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -258,6 +287,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -267,6 +297,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -276,6 +307,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -285,6 +317,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -294,6 +327,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -303,6 +337,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -312,6 +347,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -321,6 +357,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -330,6 +367,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -339,6 +377,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -348,6 +387,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -357,6 +397,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -366,6 +407,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"531" }, { @@ -375,6 +417,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"5576" }, { @@ -384,6 +427,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"16932" }, { @@ -393,6 +437,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"10879" }, { @@ -402,6 +447,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"13253" }, { @@ -411,6 +457,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"3032" }, { @@ -420,6 +467,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"613" }, { @@ -429,6 +477,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"457" }, { @@ -438,6 +487,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"205" }, { @@ -447,6 +497,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -456,6 +507,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"1884" }, { @@ -465,6 +517,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"197" }, { @@ -474,6 +527,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"175" }, { @@ -483,6 +537,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"95" }, { @@ -492,6 +547,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"204" }, { @@ -501,6 +557,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"316" }, { @@ -510,6 +567,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"150" }, { @@ -519,6 +577,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"135" }, { @@ -528,6 +587,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"189" }, { @@ -537,6 +597,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"5" }, { @@ -546,6 +607,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -555,6 +617,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -564,6 +627,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -573,6 +637,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -582,6 +647,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -591,6 +657,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -600,6 +667,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -609,6 +677,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -618,6 +687,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -627,6 +697,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -636,6 +707,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -645,6 +717,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -654,6 +727,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -663,6 +737,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -672,6 +747,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"2777" }, { @@ -681,6 +757,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"68267" }, { @@ -690,6 +767,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"19282" }, { @@ -699,6 +777,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"10344" }, { @@ -708,6 +787,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"8733" }, { @@ -717,6 +797,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"2882" }, { @@ -726,6 +807,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"636" }, { @@ -735,6 +817,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"501" }, { @@ -744,6 +827,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"197" }, { @@ -753,6 +837,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Batch Resp Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -762,6 +847,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Buffer Manager", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"248" }, { @@ -771,6 +857,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Buffer Manager", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"100" }, { @@ -780,6 +867,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Buffer Manager", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"504" }, { @@ -789,6 +877,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Buffer Manager", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"4844" }, { @@ -798,6 +887,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Buffer Manager", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -807,6 +897,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Buffer Manager", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -816,6 +907,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Buffer Manager", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"433208" }, { @@ -825,6 +917,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Buffer Manager", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"3.294704e+06" }, { @@ -834,6 +927,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Buffer Manager", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"4410" }, { @@ -843,6 +937,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Buffer Manager", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"1114" }, { @@ -852,6 +947,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Buffer Manager", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"379" }, { @@ -861,6 +957,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Buffer Node", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"4844" }, { @@ -870,6 +967,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Buffer Node", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"433208" }, { @@ -879,6 +977,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Database Replica", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -888,6 +987,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Database Replica", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -897,6 +997,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Database Replica", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -906,6 +1007,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Database Replica", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -915,6 +1017,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Database Replica", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -924,6 +1027,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Database Replica", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -933,6 +1037,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Database Replica", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -942,6 +1047,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Database Replica", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -951,6 +1057,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Database Replica", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -960,6 +1067,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Database Replica", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -969,6 +1077,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -978,6 +1087,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -987,6 +1097,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"155648" }, { @@ -996,6 +1107,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"1.1055104e+07" }, { @@ -1005,6 +1117,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1014,6 +1127,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"23752" }, { @@ -1023,6 +1137,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"5476" }, { @@ -1032,6 +1147,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"2736" }, { @@ -1041,6 +1157,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"775" }, { @@ -1050,6 +1167,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"16" }, { @@ -1059,6 +1177,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"23" }, { @@ -1068,6 +1187,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"16622" }, { @@ -1077,6 +1197,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"718" }, { @@ -1086,6 +1207,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"338" }, { @@ -1095,6 +1217,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"2372" }, { @@ -1104,6 +1227,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"67" }, { @@ -1113,6 +1237,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"6" }, { @@ -1122,6 +1247,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"412" }, { @@ -1131,6 +1257,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"2247" }, { @@ -1140,6 +1267,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"1378" }, { @@ -1149,6 +1277,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"2040" }, { @@ -1158,6 +1287,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1167,6 +1297,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"5.873664e+06" }, { @@ -1176,6 +1307,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"4800" }, { @@ -1185,6 +1317,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1194,6 +1327,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1203,6 +1337,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1212,6 +1347,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1221,6 +1357,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"8192" }, { @@ -1230,6 +1367,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"675840" }, { @@ -1239,6 +1377,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1248,6 +1387,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"8184" }, { @@ -1257,6 +1397,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"853" }, { @@ -1266,6 +1407,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"113" }, { @@ -1275,6 +1417,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"73" }, { @@ -1284,6 +1427,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1293,6 +1437,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"10" }, { @@ -1302,6 +1447,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"4395" }, { @@ -1311,6 +1457,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"33" }, { @@ -1320,6 +1467,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"34" }, { @@ -1329,6 +1477,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"1449" }, { @@ -1338,6 +1487,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"61" }, { @@ -1347,6 +1497,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"2" }, { @@ -1356,6 +1507,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"78" }, { @@ -1365,6 +1517,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"120" }, { @@ -1374,6 +1527,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"629" }, { @@ -1383,6 +1537,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"1016" }, { @@ -1392,6 +1547,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1401,6 +1557,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"692224" }, { @@ -1410,6 +1567,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"15680" }, { @@ -1419,6 +1577,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1428,6 +1587,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1437,6 +1597,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1446,6 +1607,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1455,6 +1617,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"4800" }, { @@ -1464,6 +1627,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"970752" }, { @@ -1473,6 +1637,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1482,6 +1647,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"1784" }, { @@ -1491,6 +1657,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"774" }, { @@ -1500,6 +1667,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"138" }, { @@ -1509,6 +1677,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"87" }, { @@ -1518,6 +1687,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"5" }, { @@ -1527,6 +1697,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"43" }, { @@ -1536,6 +1707,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"1452" }, { @@ -1545,6 +1717,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"36" }, { @@ -1554,6 +1727,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"33" }, { @@ -1563,6 +1737,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"4614" }, { @@ -1572,6 +1747,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"53" }, { @@ -1581,6 +1757,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"3" }, { @@ -1590,6 +1767,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"76" }, { @@ -1599,6 +1777,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"118" }, { @@ -1608,6 +1787,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"678" }, { @@ -1617,6 +1797,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"1272" }, { @@ -1626,6 +1807,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1635,6 +1817,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"708608" }, { @@ -1644,6 +1827,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"15680" }, { @@ -1653,6 +1837,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1662,6 +1847,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1671,6 +1857,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1680,6 +1867,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1689,6 +1877,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"40960" }, { @@ -1698,6 +1887,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1707,6 +1897,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1716,6 +1907,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"1272" }, { @@ -1725,6 +1917,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"648" }, { @@ -1734,6 +1927,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1743,6 +1937,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1752,6 +1947,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1761,6 +1957,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"50" }, { @@ -1770,6 +1967,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"5" }, { @@ -1779,6 +1977,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1788,6 +1987,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"244" }, { @@ -1797,6 +1997,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"2335" }, { @@ -1806,6 +2007,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"30" }, { @@ -1815,6 +2017,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1824,6 +2027,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"49" }, { @@ -1833,6 +2037,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1842,6 +2047,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"2468" }, { @@ -1851,6 +2057,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"8184" }, { @@ -1860,6 +2067,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1869,6 +2077,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"2.134016e+06" }, { @@ -1878,6 +2087,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"65536" }, { @@ -1887,6 +2097,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1896,6 +2107,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Databases", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1905,6 +2117,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Exec Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1914,6 +2127,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Exec Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1923,6 +2137,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Exec Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1932,6 +2147,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Exec Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1941,6 +2157,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Exec Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1950,6 +2167,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Exec Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1959,6 +2177,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Exec Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1968,6 +2187,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Exec Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -1977,6 +2197,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:General Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"1" }, { @@ -1986,6 +2207,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:General Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"3" }, { @@ -1995,6 +2217,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:General Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"333" }, { @@ -2004,6 +2227,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:General Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"330" }, { @@ -2013,6 +2237,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:General Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2022,6 +2247,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:General Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"62" }, { @@ -2031,6 +2257,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:General Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2040,6 +2267,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:General Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"3" }, { @@ -2049,6 +2277,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Latches", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"423" }, { @@ -2058,6 +2287,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Latches", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"1036" }, { @@ -2067,6 +2297,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Locks", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2076,6 +2307,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Locks", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"1" }, { @@ -2085,6 +2317,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Locks", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"17" }, { @@ -2094,6 +2327,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Locks", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2103,6 +2337,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Memory Broker Clerks", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"4844" }, { @@ -2112,6 +2347,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Memory Broker Clerks", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"16" }, { @@ -2121,6 +2357,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Memory Manager", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2130,6 +2367,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Memory Manager", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2139,6 +2377,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Memory Manager", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"4.588888e+06" }, { @@ -2148,6 +2387,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Memory Manager", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"376968" }, { @@ -2157,6 +2397,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Query Store", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2166,6 +2407,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Query Store", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2175,6 +2417,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Query Store", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2184,6 +2427,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Query Store", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2193,6 +2437,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Resource Pool Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2202,6 +2447,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Resource Pool Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2211,6 +2457,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Resource Pool Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2220,6 +2467,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Resource Pool Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"30960" }, { @@ -2229,6 +2477,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Resource Pool Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2238,6 +2487,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Resource Pool Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2247,6 +2497,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Resource Pool Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2256,6 +2507,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Resource Pool Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2265,6 +2517,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Resource Pool Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2274,6 +2527,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Resource Pool Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2283,6 +2537,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Resource Pool Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2292,6 +2547,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Resource Pool Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2301,6 +2557,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Resource Pool Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2310,6 +2567,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Resource Pool Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2319,6 +2577,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Resource Pool Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"277608" }, { @@ -2328,6 +2587,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Resource Pool Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2337,6 +2597,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Resource Pool Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2346,6 +2607,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Resource Pool Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2355,6 +2617,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:SQL Errors", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"1027" }, { @@ -2364,6 +2627,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:SQL Errors", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2373,6 +2637,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:SQL Errors", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"825" }, { @@ -2382,6 +2647,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:SQL Errors", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2391,6 +2657,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:SQL Errors", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"202" }, { @@ -2400,6 +2667,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:SQL Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"3375" }, { @@ -2409,6 +2677,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:SQL Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"413" }, { @@ -2418,6 +2687,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:SQL Statistics", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"63" }, { @@ -2427,6 +2697,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Transactions", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"61824" }, { @@ -2436,6 +2707,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Transactions", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2445,6 +2717,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:User Settable", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2454,6 +2727,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:User Settable", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2463,6 +2737,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:User Settable", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2472,6 +2747,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:User Settable", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2481,6 +2757,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:User Settable", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2490,6 +2767,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:User Settable", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2499,6 +2777,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:User Settable", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2508,6 +2787,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:User Settable", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2517,6 +2797,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:User Settable", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2526,6 +2807,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:User Settable", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2535,6 +2817,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Workload Group Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2544,6 +2827,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Workload Group Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2553,6 +2837,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Workload Group Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2562,6 +2847,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Workload Group Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2571,6 +2857,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Workload Group Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2580,6 +2867,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Workload Group Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2589,6 +2877,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Workload Group Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" }, { @@ -2598,6 +2887,7 @@ "measurement":"sqlserver_performance", "object":"SQLServer:Workload Group Stats", "sql_instance":"8cac97ac9b8f", + "computer_name":"abcde", "value":"0" } ] diff --git a/receiver/sqlserverreceiver/testdata/perfCounterQueryWithInstanceName.txt b/receiver/sqlserverreceiver/testdata/perfCounterQueryWithInstanceName.txt index 7e03e7319dd8..14915e9f0290 100644 --- a/receiver/sqlserverreceiver/testdata/perfCounterQueryWithInstanceName.txt +++ b/receiver/sqlserverreceiver/testdata/perfCounterQueryWithInstanceName.txt @@ -145,6 +145,7 @@ INSERT INTO @PCounters SELECT * FROM PerfCounters; SELECT 'sqlserver_performance' AS [measurement] ,REPLACE(@@SERVERNAME,'\',':') AS [sql_instance] + ,HOST_NAME() AS [computer_name] ,pc.[object_name] AS [object] ,pc.[counter_name] AS [counter] ,CASE pc.[instance_name] WHEN '_Total' THEN 'Total' ELSE ISNULL(pc.[instance_name],'') END AS [instance] diff --git a/receiver/sqlserverreceiver/testdata/perfCounterQueryWithoutInstanceName.txt b/receiver/sqlserverreceiver/testdata/perfCounterQueryWithoutInstanceName.txt index 0f8e4f7da9d5..912806a8458d 100644 --- a/receiver/sqlserverreceiver/testdata/perfCounterQueryWithoutInstanceName.txt +++ b/receiver/sqlserverreceiver/testdata/perfCounterQueryWithoutInstanceName.txt @@ -145,6 +145,7 @@ INSERT INTO @PCounters SELECT * FROM PerfCounters; SELECT 'sqlserver_performance' AS [measurement] ,REPLACE(@@SERVERNAME,'\',':') AS [sql_instance] + ,HOST_NAME() AS [computer_name] ,pc.[object_name] AS [object] ,pc.[counter_name] AS [counter] ,CASE pc.[instance_name] WHEN '_Total' THEN 'Total' ELSE ISNULL(pc.[instance_name],'') END AS [instance] diff --git a/receiver/sqlserverreceiver/testdata/propertyQueryData.txt b/receiver/sqlserverreceiver/testdata/propertyQueryData.txt index 53d1712e25ac..2c543fb7b328 100644 --- a/receiver/sqlserverreceiver/testdata/propertyQueryData.txt +++ b/receiver/sqlserverreceiver/testdata/propertyQueryData.txt @@ -1 +1 @@ -[{"ForceEncryption":"0","Port":"1433","PortType":"Static","available_server_memory":"4517288","cpu_count":"16","db_offline":"0","db_online":"4","db_recovering":"0","db_recoveryPending":"0","db_restoring":"0","db_suspect":"0","engine_edition":"3","hardware_type":"HYPERVISOR","instance_type":"0","is_hadr_enabled":"0","measurement":"sqlserver_server_properties","server_memory":"6421504","service_name":"MSSQLSERVER","sku":"Developer Edition (64-bit)","sql_instance":"ad8fb2b53dce","sql_version":"16.0.4105.2","sql_version_desc":"Microsoft SQL Server 2022 (RTM-CU11) (KB5032679) ","uptime":"17393"}] +[{"ForceEncryption":"0","Port":"1433","PortType":"Static","available_server_memory":"4517288","cpu_count":"16","db_offline":"0","db_online":"4","db_recovering":"0","db_recoveryPending":"0","db_restoring":"0","db_suspect":"0","engine_edition":"3","hardware_type":"HYPERVISOR","instance_type":"0","is_hadr_enabled":"0","measurement":"sqlserver_server_properties","server_memory":"6421504","service_name":"MSSQLSERVER","sku":"Developer Edition (64-bit)","sql_instance":"ad8fb2b53dce","computer_name":"abcde","sql_version":"16.0.4105.2","sql_version_desc":"Microsoft SQL Server 2022 (RTM-CU11) (KB5032679) ","uptime":"17393"}] diff --git a/receiver/sqlserverreceiver/testdata/propertyQueryWithInstanceName.txt b/receiver/sqlserverreceiver/testdata/propertyQueryWithInstanceName.txt index d03cb7018efd..1b23f72c515f 100644 --- a/receiver/sqlserverreceiver/testdata/propertyQueryWithInstanceName.txt +++ b/receiver/sqlserverreceiver/testdata/propertyQueryWithInstanceName.txt @@ -44,6 +44,7 @@ EXEC [xp_instance_regread] SELECT ''sqlserver_server_properties'' AS [measurement] ,REPLACE(@@SERVERNAME,''\'','':'') AS [sql_instance] + ,HOST_NAME() AS [computer_name] ,@@SERVICENAME AS [service_name] ,si.[cpu_count] ,(SELECT [total_physical_memory_kb] FROM sys.[dm_os_sys_memory]) AS [server_memory] diff --git a/receiver/sqlserverreceiver/testdata/propertyQueryWithoutInstanceName.txt b/receiver/sqlserverreceiver/testdata/propertyQueryWithoutInstanceName.txt index d36f56d58625..d5a13bc61d2e 100644 --- a/receiver/sqlserverreceiver/testdata/propertyQueryWithoutInstanceName.txt +++ b/receiver/sqlserverreceiver/testdata/propertyQueryWithoutInstanceName.txt @@ -44,6 +44,7 @@ EXEC [xp_instance_regread] SELECT ''sqlserver_server_properties'' AS [measurement] ,REPLACE(@@SERVERNAME,''\'','':'') AS [sql_instance] + ,HOST_NAME() AS [computer_name] ,@@SERVICENAME AS [service_name] ,si.[cpu_count] ,(SELECT [total_physical_memory_kb] FROM sys.[dm_os_sys_memory]) AS [server_memory] diff --git a/receiver/statsdreceiver/config_test.go b/receiver/statsdreceiver/config_test.go index 5ff7f4907f22..f1129b37bde2 100644 --- a/receiver/statsdreceiver/config_test.go +++ b/receiver/statsdreceiver/config_test.go @@ -213,8 +213,7 @@ func TestConfig_Validate_MaxSize(t *testing.T) { }, } err := cfg.Validate() - assert.Error(t, err) - assert.Contains(t, err.Error(), "histogram max_size out of range") + assert.ErrorContains(t, err, "histogram max_size out of range") } } func TestConfig_Validate_HistogramGoodConfig(t *testing.T) { diff --git a/receiver/webhookeventreceiver/config_test.go b/receiver/webhookeventreceiver/config_test.go index faa09f4d3220..3e119efb0d20 100644 --- a/receiver/webhookeventreceiver/config_test.go +++ b/receiver/webhookeventreceiver/config_test.go @@ -106,8 +106,7 @@ func TestValidateConfig(t *testing.T) { for _, test := range tests { t.Run(test.desc, func(t *testing.T) { err := test.conf.Validate() - require.Error(t, err) - require.Contains(t, err.Error(), test.expect.Error()) + require.ErrorContains(t, err, test.expect.Error()) }) } } diff --git a/receiver/webhookeventreceiver/receiver.go b/receiver/webhookeventreceiver/receiver.go index 1c7b93b3d306..4d32bafcbad0 100644 --- a/receiver/webhookeventreceiver/receiver.go +++ b/receiver/webhookeventreceiver/receiver.go @@ -191,7 +191,7 @@ func (er *eventReceiver) handleReq(w http.ResponseWriter, r *http.Request, _ htt defer er.gzipPool.Put(reader) } - // finish reading the body into a log + // send body into a scanner and then convert the request body into a log sc := bufio.NewScanner(bodyReader) ld, numLogs := reqToLog(sc, r.URL.Query(), er.cfg, er.settings) consumerErr := er.logConsumer.ConsumeLogs(ctx, ld) diff --git a/receiver/webhookeventreceiver/req_to_log.go b/receiver/webhookeventreceiver/req_to_log.go index 36ec98aaebfb..ea29a57e3e32 100644 --- a/receiver/webhookeventreceiver/req_to_log.go +++ b/receiver/webhookeventreceiver/req_to_log.go @@ -19,6 +19,18 @@ func reqToLog(sc *bufio.Scanner, query url.Values, _ *Config, settings receiver.Settings) (plog.Logs, int) { + // we simply dont split the data passed into scan (i.e. scan the whole thing) + // the downside to this approach is that only 1 log per request can be handled. + // NOTE: logs will contain these newline characters which could have formatting + // consequences downstream. + split := func(data []byte, atEOF bool) (advance int, token []byte, err error) { + if !atEOF { + return 0, nil, nil + } + return 0, data, bufio.ErrFinalToken + } + sc.Split(split) + log := plog.NewLogs() resourceLog := log.ResourceLogs().AppendEmpty() appendMetadata(resourceLog, query) diff --git a/receiver/webhookeventreceiver/req_to_log_test.go b/receiver/webhookeventreceiver/req_to_log_test.go index f1adbe9786b2..1bbbd7532309 100644 --- a/receiver/webhookeventreceiver/req_to_log_test.go +++ b/receiver/webhookeventreceiver/req_to_log_test.go @@ -60,6 +60,40 @@ func TestReqToLog(t *testing.T) { } }, }, + { + desc: "new lines present in body", + sc: func() *bufio.Scanner { + reader := io.NopCloser(bytes.NewReader([]byte("{\n\"key\":\"value\"\n}"))) + return bufio.NewScanner(reader) + }(), + query: func() url.Values { + v, err := url.ParseQuery(`qparam1=hello&qparam2=world`) + if err != nil { + log.Fatal("failed to parse query") + } + return v + }(), + tt: func(t *testing.T, reqLog plog.Logs, reqLen int, _ receiver.Settings) { + require.Equal(t, 1, reqLen) + + attributes := reqLog.ResourceLogs().At(0).Resource().Attributes() + require.Equal(t, 2, attributes.Len()) + + scopeLogsScope := reqLog.ResourceLogs().At(0).ScopeLogs().At(0).Scope() + require.Equal(t, 2, scopeLogsScope.Attributes().Len()) + + if v, ok := attributes.Get("qparam1"); ok { + require.Equal(t, "hello", v.AsString()) + } else { + require.Fail(t, "faild to set attribute from query parameter 1") + } + if v, ok := attributes.Get("qparam2"); ok { + require.Equal(t, "world", v.AsString()) + } else { + require.Fail(t, "faild to set attribute query parameter 2") + } + }, + }, { desc: "Query is empty", sc: func() *bufio.Scanner { diff --git a/receiver/zipkinreceiver/proto_parse_test.go b/receiver/zipkinreceiver/proto_parse_test.go index 105e3b200b21..2fefe29428db 100644 --- a/receiver/zipkinreceiver/proto_parse_test.go +++ b/receiver/zipkinreceiver/proto_parse_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/ptrace" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + conventions "go.opentelemetry.io/collector/semconv/v1.12.0" "google.golang.org/protobuf/proto" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/tracetranslator" diff --git a/receiver/zipkinreceiver/trace_receiver_test.go b/receiver/zipkinreceiver/trace_receiver_test.go index a93fa664b355..da2e5b067694 100644 --- a/receiver/zipkinreceiver/trace_receiver_test.go +++ b/receiver/zipkinreceiver/trace_receiver_test.go @@ -29,7 +29,7 @@ import ( "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/pdata/ptrace" "go.opentelemetry.io/collector/receiver/receivertest" - conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + conventions "go.opentelemetry.io/collector/semconv/v1.12.0" ) const ( diff --git a/testbed/go.mod b/testbed/go.mod index 75cc3a490d91..d3a8889ae466 100644 --- a/testbed/go.mod +++ b/testbed/go.mod @@ -31,9 +31,9 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/syslogreceiver v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/testbed/mockdatasenders/mockdatadogagentexporter v0.110.0 - github.com/prometheus/common v0.59.1 + github.com/prometheus/common v0.60.0 github.com/prometheus/prometheus v0.54.1 - github.com/shirou/gopsutil/v4 v4.24.8 + github.com/shirou/gopsutil/v4 v4.24.9 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.110.0 go.opentelemetry.io/collector/config/configcompression v1.16.0 @@ -65,7 +65,7 @@ require ( go.uber.org/multierr v1.11.0 go.uber.org/zap v1.27.0 golang.org/x/text v0.18.0 - google.golang.org/grpc v1.67.0 + google.golang.org/grpc v1.67.1 ) require ( @@ -79,7 +79,7 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v4 v4.3.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.2.2 // indirect github.com/Code-Hex/go-generics-cache v1.5.1 // indirect - github.com/DataDog/agent-payload/v5 v5.0.132 // indirect + github.com/DataDog/agent-payload/v5 v5.0.133 // indirect github.com/DataDog/datadog-agent/pkg/obfuscate v0.57.1 // indirect github.com/DataDog/datadog-agent/pkg/proto v0.57.1 // indirect github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.57.1 // indirect @@ -117,6 +117,7 @@ require ( github.com/docker/go-connections v0.5.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect + github.com/ebitengine/purego v0.8.0 // indirect github.com/elastic/go-grok v0.3.1 // indirect github.com/elastic/lunes v0.1.0 // indirect github.com/emicklei/go-restful/v3 v3.11.0 // indirect @@ -226,7 +227,7 @@ require ( github.com/openzipkin/zipkin-go v0.4.3 // indirect github.com/outcaste-io/ristretto v0.2.1 // indirect github.com/ovh/go-ovh v1.6.0 // indirect - github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 // indirect + github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c // indirect github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect github.com/pkg/errors v0.9.1 // indirect github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect @@ -246,7 +247,7 @@ require ( github.com/soheilhy/cmux v0.1.5 // indirect github.com/spf13/cobra v1.8.1 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/tinylib/msgp v1.2.1 // indirect + github.com/tinylib/msgp v1.2.2 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 // indirect @@ -305,7 +306,7 @@ require ( golang.org/x/exp v0.0.0-20240506185415-9bf2ced13842 // indirect golang.org/x/mod v0.20.0 // indirect golang.org/x/net v0.29.0 // indirect - golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/oauth2 v0.23.0 // indirect golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.25.0 // indirect golang.org/x/term v0.24.0 // indirect diff --git a/testbed/go.sum b/testbed/go.sum index f544c355ff79..127c12a50e8a 100644 --- a/testbed/go.sum +++ b/testbed/go.sum @@ -59,8 +59,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Code-Hex/go-generics-cache v1.5.1 h1:6vhZGc5M7Y/YD8cIUcY8kcuQLB4cHR7U+0KMqAA0KcU= github.com/Code-Hex/go-generics-cache v1.5.1/go.mod h1:qxcC9kRVrct9rHeiYpFWSoW1vxyillCVzX13KZG8dl4= -github.com/DataDog/agent-payload/v5 v5.0.132 h1:F9wy+iyAgN2QmkEsOlPp3RrQ4vOb4T6k3BXhjSpELS4= -github.com/DataDog/agent-payload/v5 v5.0.132/go.mod h1:FgVQKmVdqdmZTbxIptqJC/l+xEzdiXsaAOs/vGAvWzs= +github.com/DataDog/agent-payload/v5 v5.0.133 h1:3tl5zi6NEstCXApCyJCT5LDX5uVKloAch8/W+kVmPnY= +github.com/DataDog/agent-payload/v5 v5.0.133/go.mod h1:FgVQKmVdqdmZTbxIptqJC/l+xEzdiXsaAOs/vGAvWzs= github.com/DataDog/datadog-agent/pkg/obfuscate v0.57.1 h1:jtHJ/+WW/Ccj+3kFY48d7+NwoW5KK7tHKIfuRolE6CA= github.com/DataDog/datadog-agent/pkg/obfuscate v0.57.1/go.mod h1:Po5HwoDd4FmT/EqgrE9x7Zz4LjxtGBSIuNY1C1lppBQ= github.com/DataDog/datadog-agent/pkg/proto v0.57.1 h1:RhNjD6UiUq3cdfWFe8AqVa0YoIyM6E2hanZxWasg/WY= @@ -186,6 +186,8 @@ github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDD github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/ebitengine/purego v0.8.0 h1:JbqvnEzRvPpxhCJzJJ2y0RbiZ8nyjccVUrSM3q+GvvE= +github.com/ebitengine/purego v0.8.0/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= github.com/elastic/go-grok v0.3.1 h1:WEhUxe2KrwycMnlvMimJXvzRa7DoByJB4PVUIE1ZD/U= github.com/elastic/go-grok v0.3.1/go.mod h1:n38ls8ZgOboZRgKcjMY8eFeZFMmcL9n2lP0iHhIDk64= github.com/elastic/lunes v0.1.0 h1:amRtLPjwkWtzDF/RKzcEPMvSsSseLDLW+bnhfNSLRe4= @@ -570,8 +572,8 @@ github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144T github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM= github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 h1:jYi87L8j62qkXzaYHAQAhEapgukhenIMZRBKTNRLHJ4= -github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= +github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c h1:dAMKvw0MlJT1GshSTtih8C2gDs04w8dReiOGXrGLNoY= +github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -605,8 +607,8 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.59.1 h1:LXb1quJHWm1P6wq/U824uxYi4Sg0oGvNeUm1z5dJoX0= -github.com/prometheus/common v0.59.1/go.mod h1:GpWM7dewqmVYcd7SmRaiWVe9SSqjf0UrwnYnpEZNuT0= +github.com/prometheus/common v0.60.0 h1:+V9PAREWNvJMAuJ1x1BaWl9dewMW4YrHZQbx0sJNllA= +github.com/prometheus/common v0.60.0/go.mod h1:h0LYf1R1deLSKtD4Vdg8gy4RuOvENW2J/h19V5NADQw= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -638,8 +640,8 @@ github.com/secure-systems-lab/go-securesystemslib v0.7.0/go.mod h1:/2gYnlnHVQ6xe github.com/shirou/gopsutil v2.20.9+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil/v3 v3.24.5 h1:i0t8kL+kQTvpAYToeuiVk3TgDeKOFioZO3Ztz/iZ9pI= github.com/shirou/gopsutil/v3 v3.24.5/go.mod h1:bsoOS1aStSs9ErQ1WWfxllSeS1K5D+U30r2NfcubMVk= -github.com/shirou/gopsutil/v4 v4.24.8 h1:pVQjIenQkIhqO81mwTaXjTzOMT7d3TZkf43PlVFHENI= -github.com/shirou/gopsutil/v4 v4.24.8/go.mod h1:wE0OrJtj4dG+hYkxqDH3QiBICdKSf04/npcvLLc/oRg= +github.com/shirou/gopsutil/v4 v4.24.9 h1:KIV+/HaHD5ka5f570RZq+2SaeFsb/pq+fp2DGNWYoOI= +github.com/shirou/gopsutil/v4 v4.24.9/go.mod h1:3fkaHNeYsUFCGZ8+9vZVWtbyM1k2eRnlL+bWO8Bxa/Q= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= github.com/shoenig/test v1.7.1 h1:UJcjSAI3aUKx52kfcfhblgyhZceouhvvs3OYdWgn+PY= @@ -700,8 +702,8 @@ github.com/tidwall/tinylru v1.1.0/go.mod h1:3+bX+TJ2baOLMWTnlyNWHh4QMnFyARg2TLTQ github.com/tidwall/wal v1.1.7 h1:emc1TRjIVsdKKSnpwGBAcsAGg0767SvUk8+ygx7Bb+4= github.com/tidwall/wal v1.1.7/go.mod h1:r6lR1j27W9EPalgHiB7zLJDYu3mzW5BQP5KrzBpYY/E= github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.2.1 h1:6ypy2qcCznxpP4hpORzhtXyTqrBs7cfM9MCCWY8zsmU= -github.com/tinylib/msgp v1.2.1/go.mod h1:2vIGs3lcUo8izAATNobrCHevYZC/LMsJtw4JPiYPHro= +github.com/tinylib/msgp v1.2.2 h1:iHiBE1tJQwFI740SPEPkGE8cfhNfrqOYRlH450BnC/4= +github.com/tinylib/msgp v1.2.2/go.mod h1:ykjzy2wzgrlvpDCRc4LA8UXy6D8bzMSuAF3WD57Gok0= 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= @@ -992,8 +994,8 @@ golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4Iltr golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= -golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= +golang.org/x/oauth2 v0.23.0 h1:PbgcYx2W7i4LvjJWEbf0ngHV6qJYr86PkAV3bXdLEbs= +golang.org/x/oauth2 v0.23.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1229,8 +1231,8 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.67.0 h1:IdH9y6PF5MPSdAntIcpjQ+tXO41pcQsfZV2RxtQgVcw= -google.golang.org/grpc v1.67.0/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= +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 v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/testbed/mockdatasenders/mockdatadogagentexporter/factory.go b/testbed/mockdatasenders/mockdatadogagentexporter/factory.go index c328c3e06985..d0a00a5659ea 100644 --- a/testbed/mockdatasenders/mockdatadogagentexporter/factory.go +++ b/testbed/mockdatasenders/mockdatadogagentexporter/factory.go @@ -30,9 +30,9 @@ func NewFactory() exporter.Factory { // CreateDefaultConfig creates the default configuration for DDAPM Exporter func createDefaultConfig() component.Config { - return &Config{ - ClientConfig: confighttp.ClientConfig{Endpoint: "localhost:8126"}, - } + client := confighttp.NewDefaultClientConfig() + client.Endpoint = "localhost:8126" + return client } func CreateTracesExporter( diff --git a/testbed/mockdatasenders/mockdatadogagentexporter/go.mod b/testbed/mockdatasenders/mockdatadogagentexporter/go.mod index 907f896592b3..c068c8f6e897 100644 --- a/testbed/mockdatasenders/mockdatadogagentexporter/go.mod +++ b/testbed/mockdatasenders/mockdatadogagentexporter/go.mod @@ -4,7 +4,7 @@ go 1.22.0 require ( github.com/DataDog/datadog-agent/pkg/trace/exportable v0.0.0-20201016145401-4646cf596b02 - github.com/tinylib/msgp v1.2.1 + github.com/tinylib/msgp v1.2.2 go.opentelemetry.io/collector/component v0.110.0 go.opentelemetry.io/collector/config/confighttp v0.110.0 go.opentelemetry.io/collector/consumer v0.110.0 @@ -26,7 +26,7 @@ require ( github.com/klauspost/compress v1.17.9 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 // indirect + github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rs/cors v1.11.1 // indirect github.com/stretchr/testify v1.9.0 // indirect diff --git a/testbed/mockdatasenders/mockdatadogagentexporter/go.sum b/testbed/mockdatasenders/mockdatadogagentexporter/go.sum index 55d73302e05f..5384ad32b597 100644 --- a/testbed/mockdatasenders/mockdatadogagentexporter/go.sum +++ b/testbed/mockdatasenders/mockdatadogagentexporter/go.sum @@ -59,8 +59,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJ github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986 h1:jYi87L8j62qkXzaYHAQAhEapgukhenIMZRBKTNRLHJ4= -github.com/philhofer/fwd v1.1.3-0.20240612014219-fbbf4953d986/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= +github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c h1:dAMKvw0MlJT1GshSTtih8C2gDs04w8dReiOGXrGLNoY= +github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM= 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= @@ -76,8 +76,8 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.2.1 h1:6ypy2qcCznxpP4hpORzhtXyTqrBs7cfM9MCCWY8zsmU= -github.com/tinylib/msgp v1.2.1/go.mod h1:2vIGs3lcUo8izAATNobrCHevYZC/LMsJtw4JPiYPHro= +github.com/tinylib/msgp v1.2.2 h1:iHiBE1tJQwFI740SPEPkGE8cfhNfrqOYRlH450BnC/4= +github.com/tinylib/msgp v1.2.2/go.mod h1:ykjzy2wzgrlvpDCRc4LA8UXy6D8bzMSuAF3WD57Gok0= github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.1 h1:quXMXlA39OCbd2wAdTsGDlK9RkOk6Wuw+x37wVyIuWY= diff --git a/versions.yaml b/versions.yaml index 0ff26e843e6b..97410901355c 100644 --- a/versions.yaml +++ b/versions.yaml @@ -249,6 +249,7 @@ module-sets: - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/podmanreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/postgresqlreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver + - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusremotewritereceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/pulsarreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefareceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefbreceiver