diff --git a/.chloggen/feat-27293-reports-effective-config.yaml b/.chloggen/feat-27293-reports-effective-config.yaml new file mode 100755 index 000000000000..e436f97aaeed --- /dev/null +++ b/.chloggen/feat-27293-reports-effective-config.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: extension/opampextension + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Implement `extension.NotifyConfig` to be notified of the Collector's effective config and report it to the OpAMP server. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [27293] + +# (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/mx-psi_host.ip-ref-impl.yaml b/.chloggen/mx-psi_host.ip-ref-impl.yaml new file mode 100755 index 000000000000..69b4d7b8957d --- /dev/null +++ b/.chloggen/mx-psi_host.ip-ref-impl.yaml @@ -0,0 +1,20 @@ +# Use this changelog template to create an entry for release notes. +# If your change doesn't affect end users, such as a test fix or a tooling change, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. + +# 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: resourcedetectionprocessor + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Add detection of host.ip to system detector. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [24450] + +# (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: diff --git a/.chloggen/mx-psi_rdp-fg.yaml b/.chloggen/mx-psi_rdp-fg.yaml new file mode 100755 index 000000000000..a637744fd36e --- /dev/null +++ b/.chloggen/mx-psi_rdp-fg.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: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: resourcedetectionprocessor + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Change type of `host.cpu.model.id` and `host.cpu.model.family` from int to string. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [29025] + +# (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: | + - Disable the `processor.resourcedetection.hostCPUModelAndFamilyAsString` feature gate to get the old behavior. + +# 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-condition-sequence.yaml b/.chloggen/ottl-condition-sequence.yaml new file mode 100755 index 000000000000..ce128ae84ac8 --- /dev/null +++ b/.chloggen/ottl-condition-sequence.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 `ConditionSequence` for evaluating lists of conditions + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [29339] + +# (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/ottl-statementsequence.yaml b/.chloggen/ottl-statementsequence.yaml new file mode 100755 index 000000000000..e5781c2909b1 --- /dev/null +++ b/.chloggen/ottl-statementsequence.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: pkg/ottl + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Rename `Statements` to `StatementSequence`. Remove `Eval` function from `StatementSequence`, use `ConditionSequence` instead. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [29598] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [api] diff --git a/.github/workflows/build-and-test-windows.yml b/.github/workflows/build-and-test-windows.yml index c91bbf220f15..16ad3b69716c 100644 --- a/.github/workflows/build-and-test-windows.yml +++ b/.github/workflows/build-and-test-windows.yml @@ -60,6 +60,9 @@ jobs: ~\go\pkg\mod ~\AppData\Local\go-build key: go-build-cache-${{ runner.os }}-${{ matrix.group }}-go-${{ hashFiles('**/go.sum') }} + - if: matrix.group == 'cmd' + name: Increasing GOTEST_TIMEOUT for group 'cmd' + run: echo "GOTEST_TIMEOUT=1200s" >> $Env:GITHUB_ENV - name: Run Unit tests run: make -j2 gotest GROUP=${{ matrix.group }} windows-unittest: diff --git a/.github/workflows/scripts/get-codeowners.sh b/.github/workflows/scripts/get-codeowners.sh index e7bb4ec673cc..d07bcce9179d 100755 --- a/.github/workflows/scripts/get-codeowners.sh +++ b/.github/workflows/scripts/get-codeowners.sh @@ -9,6 +9,10 @@ set -euo pipefail +get_codeowners() { + echo "$((grep -m 1 "${1}" .github/CODEOWNERS || true) | sed 's/ */ /g' | cut -f3- -d ' ')" +} + if [[ -z "${COMPONENT:-}" ]]; then echo "COMPONENT has not been set, please ensure it is set." exit 1 @@ -20,13 +24,16 @@ RESULT=$(grep -c "${COMPONENT}" .github/CODEOWNERS || true) # there may be more than 1 component matching a label # if so, try to narrow things down by appending the component -# type to the label +# or a forward slash to the label. if [[ ${RESULT} != 1 ]]; then COMPONENT_TYPE=$(echo "${COMPONENT}" | cut -f 1 -d '/') - COMPONENT="${COMPONENT}${COMPONENT_TYPE}" -fi + OWNERS="$(get_codeowners "${COMPONENT}${COMPONENT_TYPE}")" -OWNERS=$( (grep -m 1 "${COMPONENT}" .github/CODEOWNERS || true) | sed 's/ */ /g' | cut -f3- -d ' ' ) + if [[ -z "${OWNERS:-}" ]]; then + OWNERS="$(get_codeowners "${COMPONENT}/")" + fi +else + OWNERS="$(get_codeowners $COMPONENT)" +fi echo "${OWNERS}" - diff --git a/Makefile.Common b/Makefile.Common index be080026e0cf..901316b35a82 100644 --- a/Makefile.Common +++ b/Makefile.Common @@ -23,7 +23,8 @@ SRC_ROOT := $(shell git rev-parse --show-toplevel) # build tags required by any component should be defined as an independent variables and later added to GO_BUILD_TAGS below GO_BUILD_TAGS="" -GOTEST_OPT?= -race -timeout 300s -parallel 4 --tags=$(GO_BUILD_TAGS) +GOTEST_TIMEOUT?= 300s +GOTEST_OPT?= -race -timeout $(GOTEST_TIMEOUT) -parallel 4 --tags=$(GO_BUILD_TAGS) GOTEST_INTEGRATION_OPT?= -race -timeout 360s -parallel 4 GOTEST_OPT_WITH_COVERAGE = $(GOTEST_OPT) -coverprofile=coverage.txt -covermode=atomic GOTEST_OPT_WITH_INTEGRATION=$(GOTEST_INTEGRATION_OPT) -tags=integration,$(GO_BUILD_TAGS) -run=Integration diff --git a/cmd/configschema/go.mod b/cmd/configschema/go.mod index 3d638816a7ba..0417af8b2815 100644 --- a/cmd/configschema/go.mod +++ b/cmd/configschema/go.mod @@ -244,7 +244,7 @@ require ( github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/ReneKroon/ttlcache/v2 v2.11.0 // indirect - github.com/SAP/go-hdb v1.6.2 // indirect + github.com/SAP/go-hdb v1.6.3 // indirect github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc // indirect github.com/Showmax/go-fqdn v1.0.0 // indirect github.com/aerospike/aerospike-client-go/v6 v6.13.0 // indirect @@ -259,27 +259,27 @@ require ( github.com/apache/thrift v0.19.0 // indirect github.com/ardielle/ardielle-go v1.5.2 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.48.5 // indirect - github.com/aws/aws-sdk-go-v2 v1.23.1 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1 // indirect - github.com/aws/aws-sdk-go-v2/config v1.25.5 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.16.4 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5 // indirect + github.com/aws/aws-sdk-go v1.48.9 // indirect + github.com/aws/aws-sdk-go-v2 v1.23.4 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3 // indirect + github.com/aws/aws-sdk-go-v2/config v1.25.10 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.16.8 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8 // indirect github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.59 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.23 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3 // indirect github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.26 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.0 // indirect - github.com/aws/aws-sdk-go-v2/service/kinesis v1.23.0 // indirect + github.com/aws/aws-sdk-go-v2/service/kinesis v1.24.1 // indirect github.com/aws/aws-sdk-go-v2/service/s3 v1.31.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.17.3 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.25.4 // indirect - github.com/aws/smithy-go v1.17.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.18.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.26.1 // indirect + github.com/aws/smithy-go v1.18.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect @@ -580,21 +580,21 @@ require ( github.com/shopspring/decimal v1.3.1 // indirect github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 // indirect github.com/signalfx/sapm-proto v0.13.0 // indirect - github.com/sijms/go-ora/v2 v2.7.22 // indirect + github.com/sijms/go-ora/v2 v2.7.23 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/snowflakedb/gosnowflake v1.7.0 // indirect github.com/soheilhy/cmux v0.1.5 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/afero v1.10.0 // indirect - github.com/spf13/cast v1.5.1 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.17.0 // indirect github.com/stretchr/objx v0.5.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.803 // indirect + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.807 // indirect github.com/tg123/go-htpasswd v1.2.1 // indirect github.com/tidwall/gjson v1.14.3 // indirect github.com/tidwall/match v1.1.1 // indirect diff --git a/cmd/configschema/go.sum b/cmd/configschema/go.sum index 3b9c15adecf7..b2e553d9cb02 100644 --- a/cmd/configschema/go.sum +++ b/cmd/configschema/go.sum @@ -233,8 +233,8 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/ReneKroon/ttlcache/v2 v2.11.0 h1:OvlcYFYi941SBN3v9dsDcC2N8vRxyHcCmJb3Vl4QMoM= github.com/ReneKroon/ttlcache/v2 v2.11.0/go.mod h1:mBxvsNY+BT8qLLd6CuAJubbKo6r0jh3nb5et22bbfGY= -github.com/SAP/go-hdb v1.6.2 h1:sC0OjTEfPnycIktkCDvS7GelaGOiRrhWE0GWUt05QP8= -github.com/SAP/go-hdb v1.6.2/go.mod h1:xXsEywFErhpCuRVQ3HfjI7H7fPLYPMnMTWa9D5Enx0Q= +github.com/SAP/go-hdb v1.6.3 h1:O2DTMCf4vGYG7W6TjrSIezUz7y0mF5j/E6w6ol1pbho= +github.com/SAP/go-hdb v1.6.3/go.mod h1:TKQ0SvP6dwcVKCu4q9yisg5mTtWPoAbc3lLzkgrAC5M= github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2/go.mod h1:ARgCUhI1MHQH+ONky/PAtmVHQrP5JlGY0F3poXOp/fA= github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc h1:MhBvG7RLaLqlyjxMR6of35vt6MVQ+eXMcgn9X/sy0FE= github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc/go.mod h1:ARgCUhI1MHQH+ONky/PAtmVHQrP5JlGY0F3poXOp/fA= @@ -321,38 +321,38 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN github.com/aws/aws-sdk-go v1.32.6/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.44.263/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.17.7/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= -github.com/aws/aws-sdk-go-v2 v1.23.1 h1:qXaFsOOMA+HsZtX8WoCa+gJnbyW7qyFFBlPqvTSzbaI= -github.com/aws/aws-sdk-go-v2 v1.23.1/go.mod h1:i1XDttT4rnf6vxc9AuskLc6s7XBee8rlLilKlc03uAA= +github.com/aws/aws-sdk-go-v2 v1.23.4 h1:2P20ZjH0ouSAu/6yZep8oCmTReathLuEu6dwoqEgjts= +github.com/aws/aws-sdk-go-v2 v1.23.4/go.mod h1:t3szzKfP0NeRU27uBFczDivYJjsmSnqI8kIvKyWb9ds= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10/go.mod h1:VeTZetY5KRJLuD/7fkQXMU6Mw7H5m/KP2J5Iy9osMno= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1 h1:ZY3108YtBNq96jNZTICHxN1gSBSbnvIdYwwqnvCV4Mc= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1/go.mod h1:t8PYl/6LzdAqsU4/9tz28V/kU+asFePvpOMkdul0gEQ= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3 h1:Zx9+31KyB8wQna6SXFWOewlgoY5uGdDAu6PTOEU3OQI= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3/go.mod h1:zxbEJhRdKTH1nqS2qu6UJ7zGe25xaHxZXaC2CvuQFnA= github.com/aws/aws-sdk-go-v2/config v1.18.19/go.mod h1:XvTmGMY8d52ougvakOv1RpiTLPz9dlG/OQHsKU/cMmY= github.com/aws/aws-sdk-go-v2/config v1.18.25/go.mod h1:dZnYpD5wTW/dQF0rRNLVypB396zWCcPiBIvdvSWHEg4= -github.com/aws/aws-sdk-go-v2/config v1.25.5 h1:UGKm9hpQS2hoK8CEJ1BzAW8NbUpvwDJJ4lyqXSzu8bk= -github.com/aws/aws-sdk-go-v2/config v1.25.5/go.mod h1:Bf4gDvy4ZcFIK0rqDu1wp9wrubNba2DojiPB2rt6nvI= +github.com/aws/aws-sdk-go-v2/config v1.25.10 h1:qw/e8emDtNufTkrAU86DlQ18DruMyyM7ttW6Lgwp4v0= +github.com/aws/aws-sdk-go-v2/config v1.25.10/go.mod h1:203YiAtb6XyoGxXMPsUVwEcuxCiTQY/r8P27IDjfvMc= github.com/aws/aws-sdk-go-v2/credentials v1.13.18/go.mod h1:vnwlwjIe+3XJPBYKu1et30ZPABG3VaXJYr8ryohpIyM= github.com/aws/aws-sdk-go-v2/credentials v1.13.24/go.mod h1:jYPYi99wUOPIFi0rhiOvXeSEReVOzBqFNOX5bXYoG2o= -github.com/aws/aws-sdk-go-v2/credentials v1.16.4 h1:i7UQYYDSJrtc30RSwJwfBKwLFNnBTiICqAJ0pPdum8E= -github.com/aws/aws-sdk-go-v2/credentials v1.16.4/go.mod h1:Kdh/okh+//vQ/AjEt81CjvkTo64+/zIE4OewP7RpfXk= +github.com/aws/aws-sdk-go-v2/credentials v1.16.8 h1:phw9nRLy/77bPk6Mfu2SHCOnHwfVB7WWrOa5rZIY2Fc= +github.com/aws/aws-sdk-go-v2/credentials v1.16.8/go.mod h1:MrS4SOin6adbO6wgWhdifyPiq+TX7fPPwyA/ZLC1F5M= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.1/go.mod h1:lfUx8puBRdM5lVVMQlwt2v+ofiG/X6Ms+dy0UkG/kXw= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5 h1:KehRNiVzIfAcj6gw98zotVbb/K67taJE0fkfgM6vzqU= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5/go.mod h1:VhnExhw6uXy9QzetvpXDolo1/hjhx4u9qukBGkuUwjs= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8 h1:tQZLSPC2Zj2CqZHonLmWEvCsbpMX5tQvaYJWHadcPek= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8/go.mod h1:5+YpvTHDFffykWr5qAGjqwoh8oVYZOddL3sSrEN7lws= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.59 h1:E3Y+OfzOK1+rmRo/K2G0ml8Vs+Xqk0kOnf4nS0kUtBc= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.59/go.mod h1:1M4PLSBUVfBI0aP+C9XI7SM6kZPCGYyI6izWz0TGprE= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.31/go.mod h1:QT0BqUvX1Bh2ABdTGnjqEjvjzrCfIniM9Sc8zn9Yndo= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 h1:LAm3Ycm9HJfbSCd5I+wqC2S9Ej7FPrgr5CQoOljJZcE= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4/go.mod h1:xEhvbJcyUf/31yfGSQBe01fukXwXJ0gxDp7rLfymWE0= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7 h1:eMqD7ku6WGdmcWWXPYun9m6yk6feSULLhJlAtN6rYG4= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7/go.mod h1:0oBIfcDV6LScxEW0VgOqxT3e4aqKRp+SYhB9wAd5E3Q= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.25/go.mod h1:zBHOPwhBc3FlQjQJE/D3IfPWiWaQmT06Vq9aNukDo0k= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27/go.mod h1:UrHnn3QV/d0pBZ6QBAEQcqFLf8FAzLmoUfPVIueOvoM= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 h1:4GV0kKZzUxiWxSVpn/9gwR0g21NF1Jsyduzo9rHgC/Q= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4/go.mod h1:dYvTNAggxDZy6y1AF7YDwXsPuHFy/VNEpEI/2dWK9IU= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7 h1:+XYhWhgWs5F3Zx8oa49CXzNvfXrItaDjZB/M172fcHQ= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7/go.mod h1:L6tcSRyCGxcKfDWUrmv2jv8G1cLDU7d0FUpEFpG9bVE= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.32/go.mod h1:XGhIBZDEgfqmFIugclZ6FU7v75nHhBDtzuB4xB/tEi4= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34/go.mod h1:Etz2dj6UHYuw+Xw830KfzCfWGMzqvUTCjUj5b76GVDc= github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 h1:uR9lXYjdPX0xY+NhvaJ4dD8rpSRz5VY81ccIIoNG+lw= @@ -360,35 +360,35 @@ github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1/go.mod h1:6fQQgfuGmw8Al/3M2IgIl github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.23 h1:DWYZIsyqagnWL00f8M/SOr9fN063OEQWn9LLTbdYXsk= github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.23/go.mod h1:uIiFgURZbACBEQJfqTZPb/jxO7R+9LeoHUFudtIdeQI= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11/go.mod h1:iV4q2hsqtNECrfmlXyord9u4zyuFEJX9eLgLpSPzWA8= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 h1:rpkF4n0CyFcrJUG/rNNohoTmhtWlFTRI4BsZOh9PvLs= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1/go.mod h1:l9ymW25HOqymeU2m1gbUQ3rUIsTwKs8gYHXkqDQUhiI= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3 h1:e3PCNeEaev/ZF01cQyNZgmYE9oYYePIMJs2mWSKG514= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3/go.mod h1:gIeeNyaL8tIEqZrzAnTeyhHcE0yysCtcaP+N9kxLZ+E= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.26 h1:CeuSeq/8FnYpPtnuIeLQEEvDv9zUjneuYi8EghMBdwQ= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.26/go.mod h1:2UqAAwMUXKeRkAHIlDJqvMVgOWkUi/AUXPk/YIe+Dg4= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.25/go.mod h1:/95IA+0lMnzW6XzqYJRpjjsAbKEORVeO0anQqjd2CNU= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27/go.mod h1:EOwBD4J4S5qYszS5/3DpkejfuK+Z5/1uzICfPaZLtqw= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 h1:rdovz3rEu0vZKbzoMYPTehp0E8veoE9AyfzqCr5Eeao= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4/go.mod h1:aYCGNjyUCUelhofxlZyj63srdxWUSsBSGg5l6MCuXuE= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7 h1:dU+ZyhvqMB/T/TxjGagHMCdyUiqaThRIaMu3YvKiSQI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7/go.mod h1:SGORuNqoXyWfTvTp/gBGJfv8jRvW/+nha0XhnIXVI+o= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.0 h1:e2ooMhpYGhDnBfSvIyusvAwX7KexuZaHbQY2Dyei7VU= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.0/go.mod h1:bh2E0CXKZsQN+faiKVqC40vfNMAWheoULBCnEgO9K+8= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.23.0 h1:RvZSZVBFjF2x4mJ5OqLFmtoJA5KIhlhgEGs9kteIusE= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.23.0/go.mod h1:+ad1py1y3c7ohCbA4zDO6UQ5AALnL+C801tG88bKc40= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.24.1 h1:EOEDoN6rIDbFN3WrzzYwj82H7zqw+qXXirfnOl/ZPDU= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.24.1/go.mod h1:qThvXq8d2PpR9W5n+UJMM0B47AB6sGIwp/bedko7I9k= github.com/aws/aws-sdk-go-v2/service/s3 v1.31.0 h1:B1G2pSPvbAtQjilPq+Y7jLIzCOwKzuVEl+aBBaNG0AQ= github.com/aws/aws-sdk-go-v2/service/s3 v1.31.0/go.mod h1:ncltU6n4Nof5uJttDtcNQ537uNuwYqsZZQcpkd2/GUQ= github.com/aws/aws-sdk-go-v2/service/sso v1.12.6/go.mod h1:Y1VOmit/Fn6Tz1uFAeCO6Q7M2fmfXSCLeL5INVYsLuY= 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.17.3 h1:CdsSOGlFF3Pn+koXOIpTtvX7st0IuGsZ8kJqcWMlX54= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.3/go.mod h1:oA6VjNsLll2eVuUoF2D+CMyORgNzPEW/3PyUdq6WQjI= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.1 h1:V40g2daNO3l1J94JYwqfkyvQMYXi5I25fs3fNQW8iDs= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.1/go.mod h1:0ZWQJP/mBOUxkCvZKybZNz1XmdUKSBxoF0dzgfxtvDs= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.6/go.mod h1:Lh/bc9XUf8CfOY6Jp5aIkQtN+j1mc+nExc+KXj9jx2s= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10/go.mod h1:AFvkxc8xfBe8XA+5St5XIHHrQQtkxqrRincx4hmMHOk= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 h1:cbRqFTVnJV+KRpwFl76GJdIZJKKCdTPnjUZ7uWh3pIU= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1/go.mod h1:hHL974p5auvXlZPIjJTblXJpbkfK4klBczlsEaMCGVY= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1 h1:uQrj7SpUNC3r55vc1CDh3qV9wJC66lz546xM9dhSo5s= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1/go.mod h1:oyaTk5xEAOuPXX1kCD7HmIeuLqdj3Bk5yGkqGXtGi14= github.com/aws/aws-sdk-go-v2/service/sts v1.18.7/go.mod h1:JuTnSoeePXmMVe9G8NcjjwgOKEfZ4cOjMuT2IBT/2eI= github.com/aws/aws-sdk-go-v2/service/sts v1.19.0/go.mod h1:BgQOMsg8av8jset59jelyPW7NoZcZXLVpDsXunGDrk8= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.4 h1:yEvZ4neOQ/KpUqyR+X0ycUTW/kVRNR4nDZ38wStHGAA= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.4/go.mod h1:feTnm2Tk/pJxdX+eooEsxvlvTWBvDm6CasRZ+JOs2IY= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.1 h1:K33V7L0XDdb23FMOZySr8bon1jou5SHn1fiv7NJ1SUg= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.1/go.mod h1:YtXUl/sfnS06VksYhr855hTQf2HphfT1Xv/EwuzbPjg= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= -github.com/aws/smithy-go v1.17.0 h1:wWJD7LX6PBV6etBUwO0zElG0nWN9rUhp0WdYeHSHAaI= -github.com/aws/smithy-go v1.17.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= +github.com/aws/smithy-go v1.18.1 h1:pOdBTUfXNazOlxLrgeYalVnuTpKreACHtc62xLwIB3c= +github.com/aws/smithy-go v1.18.1/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= github.com/basgys/goxml2json v1.1.0 h1:4ln5i4rseYfXNd86lGEB+Vi652IsIXIvggKM/BhUKVw= github.com/beefsack/go-rate v0.0.0-20220214233405-116f4ca011a0/go.mod h1:6YNgTHLutezwnBvyneBbwvB8C82y3dcoOj5EQJIdGXA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -586,7 +586,7 @@ github.com/frankban/quicktest v1.10.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P github.com/frankban/quicktest v1.11.0/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/frankban/quicktest v1.11.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/frankban/quicktest v1.13.0/go.mod h1:qLE0fzW0VuyUAJgPU19zByoIr0HtCHN/r/VLSOOIySU= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= @@ -1425,8 +1425,8 @@ github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 h1:32k2QLgsKhcEs55q4REP github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3/go.mod h1:gJrXWi7wSGXfiC7+VheQaz+ypdCt5SmZNL+BRxUe7y4= github.com/signalfx/sapm-proto v0.13.0 h1:yEkp1+MAU4vZvnJMp56uhVlRjlvCK7KQjBg0g2Apw8k= github.com/signalfx/sapm-proto v0.13.0/go.mod h1:C72HjeCW5v0Llk6pIVJ/ZH8A5GbiZpCCSkE1dSlpWxY= -github.com/sijms/go-ora/v2 v2.7.22 h1:B2mSLhDDWTgsjdM0d/O7iJn041cBy5z7fA8sR082vCg= -github.com/sijms/go-ora/v2 v2.7.22/go.mod h1:EHxlY6x7y9HAsdfumurRfTd+v8NrEOTR3Xl4FWlH6xk= +github.com/sijms/go-ora/v2 v2.7.23 h1:a9/7sm4bOnIhwcxMcilRAADxabLh90tMiryfMVslcK8= +github.com/sijms/go-ora/v2 v2.7.23/go.mod h1:EHxlY6x7y9HAsdfumurRfTd+v8NrEOTR3Xl4FWlH6xk= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -1454,8 +1454,8 @@ github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= @@ -1497,8 +1497,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.803 h1:Kiv40x5ydJVRZfzN3vto8N6sfPhTkt9UL1PLhKmmoyQ= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.803/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.807 h1:L/frkQ4e34Q9WsVJn+666Mk3WmJQuAwBKOs5198c/So= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.807/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/testcontainers/testcontainers-go v0.26.0 h1:uqcYdoOHBy1ca7gKODfBd9uTHVK3a7UL848z09MVZ0c= github.com/tg123/go-htpasswd v1.2.1 h1:i4wfsX1KvvkyoMiHZzjS0VzbAPWfxzI8INcZAKtutoU= github.com/tg123/go-htpasswd v1.2.1/go.mod h1:erHp1B86KXdwQf1X5ZrLb7erXZnWueEQezb2dql4q58= @@ -1542,7 +1542,7 @@ github.com/vishvananda/netlink v1.2.1-beta.2/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhg github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f h1:p4VB7kIXpOQvVn1ZaTIVp+3vuYAXFe3OJEvjbUYJLaA= github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= -github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= +github.com/vmihailenco/msgpack/v4 v4.3.13 h1:A2wsiTbvp63ilDaWmsk2wjx6xZdxQOvpiNlKBGKKXKI= github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= github.com/vmware/go-vmware-nsxt v0.0.0-20230223012718-d31b8a1ca05e h1:Vu41Q0Pv3yMdd+tcDW6QeEUIK2L+9ZrPrq8NAMrKSLc= github.com/vmware/go-vmware-nsxt v0.0.0-20230223012718-d31b8a1ca05e/go.mod h1:aRq5pxwgdJpAuP97SCjX1+Db32z/b0dggQ07FDF+fqE= diff --git a/cmd/opampsupervisor/specification/README.md b/cmd/opampsupervisor/specification/README.md index 5ca8f9f62889..909ca86f58e5 100644 --- a/cmd/opampsupervisor/specification/README.md +++ b/cmd/opampsupervisor/specification/README.md @@ -84,33 +84,33 @@ server: # If enabled the Supervisor will also report RemoteConfig status # to the Server. capabilities: - AcceptsRemoteConfig: # false if unspecified + accepts_remote_config: # false if unspecified # The Supervisor will report EffectiveConfig to the Server. - ReportsEffectiveConfig: # true if unspecified + reports_effective_config: # true if unspecified # The Supervisor can accept Collector executable package updates. # If enabled the Supervisor will also report package status to the # Server. - AcceptsPackages: # false if unspecified + accepts_packages: # false if unspecified # The Collector will report own metrics to the destination specified by # the Server. - ReportsOwnMetrics: # true if unspecified + reports_own_metrics: # true if unspecified # The Collector will report own logs to the destination specified by # the Server. - ReportsOwnLogs: # true if unspecified + reports_own_logs: # true if unspecified # The Collector will accept connections settings for exporters # from the Server. - AcceptsOtherConnectionSettings: # false if unspecified + accepts_other_connection_settings: # false if unspecified # The Supervisor will accept restart requests. - AcceptsRestartCommand: # true if unspecified + accepts_restart_command: # true if unspecified # The Collector will report Health. - ReportsHealth: # true if unspecified + reports_health: # true if unspecified storage: # A writable directory where the Supervisor can store data diff --git a/cmd/otelcontribcol/exporters_test.go b/cmd/otelcontribcol/exporters_test.go index 67db4f55feb2..456851a82c88 100644 --- a/cmd/otelcontribcol/exporters_test.go +++ b/cmd/otelcontribcol/exporters_test.go @@ -1,16 +1,13 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Skip tests on Windows temporarily, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/11451 -//go:build !windows -// +build !windows - package main import ( "context" "errors" "path/filepath" + "runtime" "testing" "github.com/stretchr/testify/assert" @@ -104,9 +101,10 @@ func TestDefaultExporters(t *testing.T) { exporter: "file", getConfigFn: func() component.Config { cfg := expFactories["file"].CreateDefaultConfig().(*fileexporter.Config) - cfg.Path = filepath.Join(t.TempDir(), "random.file") + cfg.Path = filepath.Join(t.TempDir(), "file.exporter.random.file") return cfg }, + skipLifecycle: runtime.GOOS == "windows", // On Windows not all handles are closed when the exporter is shutdown. }, { exporter: "kafka", @@ -415,7 +413,7 @@ func TestDefaultExporters(t *testing.T) { cfg := expFactories["f5cloud"].CreateDefaultConfig().(*f5cloudexporter.Config) cfg.Endpoint = "http://" + endpoint cfg.Source = "magic-source" - cfg.AuthConfig.CredentialFile = filepath.Join(t.TempDir(), "random.file") + cfg.AuthConfig.CredentialFile = filepath.Join(t.TempDir(), "f5cloud.exporter.random.file") // disable queue/retry to validate passing the test data synchronously cfg.QueueSettings.Enabled = false cfg.RetrySettings.Enabled = false diff --git a/cmd/otelcontribcol/go.mod b/cmd/otelcontribcol/go.mod index 0bfa44b62c8d..4562abd99f98 100644 --- a/cmd/otelcontribcol/go.mod +++ b/cmd/otelcontribcol/go.mod @@ -214,7 +214,7 @@ require ( require ( bitbucket.org/atlassian/go-asap/v2 v2.6.0 // indirect - cloud.google.com/go v0.110.10 // indirect + cloud.google.com/go v0.111.0 // indirect cloud.google.com/go/compute v1.23.3 // indirect cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 // indirect cloud.google.com/go/iam v1.1.5 // indirect @@ -289,7 +289,7 @@ require ( github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/ReneKroon/ttlcache/v2 v2.11.0 // indirect - github.com/SAP/go-hdb v1.6.2 // indirect + github.com/SAP/go-hdb v1.6.3 // indirect github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc // indirect github.com/Showmax/go-fqdn v1.0.0 // indirect github.com/aerospike/aerospike-client-go/v6 v6.13.0 // indirect @@ -304,27 +304,27 @@ require ( github.com/apache/thrift v0.19.0 // indirect github.com/ardielle/ardielle-go v1.5.2 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.48.5 // indirect - github.com/aws/aws-sdk-go-v2 v1.23.1 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1 // indirect - github.com/aws/aws-sdk-go-v2/config v1.25.5 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.16.4 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5 // indirect + github.com/aws/aws-sdk-go v1.48.9 // indirect + github.com/aws/aws-sdk-go-v2 v1.23.4 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3 // indirect + github.com/aws/aws-sdk-go-v2/config v1.25.10 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.16.8 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8 // indirect github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.59 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.23 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3 // indirect github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.26 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.0 // indirect - github.com/aws/aws-sdk-go-v2/service/kinesis v1.23.0 // indirect + github.com/aws/aws-sdk-go-v2/service/kinesis v1.24.1 // indirect github.com/aws/aws-sdk-go-v2/service/s3 v1.31.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.17.3 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.25.4 // indirect - github.com/aws/smithy-go v1.17.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.18.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.26.1 // indirect + github.com/aws/smithy-go v1.18.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect @@ -600,21 +600,21 @@ require ( github.com/shopspring/decimal v1.3.1 // indirect github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 // indirect github.com/signalfx/sapm-proto v0.13.0 // indirect - github.com/sijms/go-ora/v2 v2.7.22 // indirect + github.com/sijms/go-ora/v2 v2.7.23 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/snowflakedb/gosnowflake v1.7.0 // indirect github.com/soheilhy/cmux v0.1.5 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/afero v1.10.0 // indirect - github.com/spf13/cast v1.5.1 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.17.0 // indirect github.com/stretchr/objx v0.5.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.802 // indirect + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.807 // indirect github.com/tg123/go-htpasswd v1.2.1 // indirect github.com/tidwall/gjson v1.10.2 // indirect github.com/tidwall/match v1.1.1 // indirect diff --git a/cmd/otelcontribcol/go.sum b/cmd/otelcontribcol/go.sum index 33de6df82417..8657bd20f430 100644 --- a/cmd/otelcontribcol/go.sum +++ b/cmd/otelcontribcol/go.sum @@ -22,8 +22,8 @@ cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPT cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= -cloud.google.com/go v0.110.10 h1:LXy9GEO+timppncPIAZoOj3l58LIU9k+kn48AN7IO3Y= -cloud.google.com/go v0.110.10/go.mod h1:v1OoFqYxiBkUrruItNM3eT4lLByNjxmJSV/xDKJNnic= +cloud.google.com/go v0.111.0 h1:YHLKNupSD1KqjDbQ3+LVdQ81h/UJbJyZG203cEfnQgM= +cloud.google.com/go v0.111.0/go.mod h1:0mibmpKP1TyOOFYQY5izo0LnT+ecvOQ0Sg3OdmMiNRU= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -232,8 +232,8 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/ReneKroon/ttlcache/v2 v2.11.0 h1:OvlcYFYi941SBN3v9dsDcC2N8vRxyHcCmJb3Vl4QMoM= github.com/ReneKroon/ttlcache/v2 v2.11.0/go.mod h1:mBxvsNY+BT8qLLd6CuAJubbKo6r0jh3nb5et22bbfGY= -github.com/SAP/go-hdb v1.6.2 h1:sC0OjTEfPnycIktkCDvS7GelaGOiRrhWE0GWUt05QP8= -github.com/SAP/go-hdb v1.6.2/go.mod h1:xXsEywFErhpCuRVQ3HfjI7H7fPLYPMnMTWa9D5Enx0Q= +github.com/SAP/go-hdb v1.6.3 h1:O2DTMCf4vGYG7W6TjrSIezUz7y0mF5j/E6w6ol1pbho= +github.com/SAP/go-hdb v1.6.3/go.mod h1:TKQ0SvP6dwcVKCu4q9yisg5mTtWPoAbc3lLzkgrAC5M= github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2/go.mod h1:ARgCUhI1MHQH+ONky/PAtmVHQrP5JlGY0F3poXOp/fA= github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc h1:MhBvG7RLaLqlyjxMR6of35vt6MVQ+eXMcgn9X/sy0FE= github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc/go.mod h1:ARgCUhI1MHQH+ONky/PAtmVHQrP5JlGY0F3poXOp/fA= @@ -320,38 +320,38 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN github.com/aws/aws-sdk-go v1.32.6/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.44.263/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.17.7/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= -github.com/aws/aws-sdk-go-v2 v1.23.1 h1:qXaFsOOMA+HsZtX8WoCa+gJnbyW7qyFFBlPqvTSzbaI= -github.com/aws/aws-sdk-go-v2 v1.23.1/go.mod h1:i1XDttT4rnf6vxc9AuskLc6s7XBee8rlLilKlc03uAA= +github.com/aws/aws-sdk-go-v2 v1.23.4 h1:2P20ZjH0ouSAu/6yZep8oCmTReathLuEu6dwoqEgjts= +github.com/aws/aws-sdk-go-v2 v1.23.4/go.mod h1:t3szzKfP0NeRU27uBFczDivYJjsmSnqI8kIvKyWb9ds= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10/go.mod h1:VeTZetY5KRJLuD/7fkQXMU6Mw7H5m/KP2J5Iy9osMno= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1 h1:ZY3108YtBNq96jNZTICHxN1gSBSbnvIdYwwqnvCV4Mc= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1/go.mod h1:t8PYl/6LzdAqsU4/9tz28V/kU+asFePvpOMkdul0gEQ= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3 h1:Zx9+31KyB8wQna6SXFWOewlgoY5uGdDAu6PTOEU3OQI= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3/go.mod h1:zxbEJhRdKTH1nqS2qu6UJ7zGe25xaHxZXaC2CvuQFnA= github.com/aws/aws-sdk-go-v2/config v1.18.19/go.mod h1:XvTmGMY8d52ougvakOv1RpiTLPz9dlG/OQHsKU/cMmY= github.com/aws/aws-sdk-go-v2/config v1.18.25/go.mod h1:dZnYpD5wTW/dQF0rRNLVypB396zWCcPiBIvdvSWHEg4= -github.com/aws/aws-sdk-go-v2/config v1.25.5 h1:UGKm9hpQS2hoK8CEJ1BzAW8NbUpvwDJJ4lyqXSzu8bk= -github.com/aws/aws-sdk-go-v2/config v1.25.5/go.mod h1:Bf4gDvy4ZcFIK0rqDu1wp9wrubNba2DojiPB2rt6nvI= +github.com/aws/aws-sdk-go-v2/config v1.25.10 h1:qw/e8emDtNufTkrAU86DlQ18DruMyyM7ttW6Lgwp4v0= +github.com/aws/aws-sdk-go-v2/config v1.25.10/go.mod h1:203YiAtb6XyoGxXMPsUVwEcuxCiTQY/r8P27IDjfvMc= github.com/aws/aws-sdk-go-v2/credentials v1.13.18/go.mod h1:vnwlwjIe+3XJPBYKu1et30ZPABG3VaXJYr8ryohpIyM= github.com/aws/aws-sdk-go-v2/credentials v1.13.24/go.mod h1:jYPYi99wUOPIFi0rhiOvXeSEReVOzBqFNOX5bXYoG2o= -github.com/aws/aws-sdk-go-v2/credentials v1.16.4 h1:i7UQYYDSJrtc30RSwJwfBKwLFNnBTiICqAJ0pPdum8E= -github.com/aws/aws-sdk-go-v2/credentials v1.16.4/go.mod h1:Kdh/okh+//vQ/AjEt81CjvkTo64+/zIE4OewP7RpfXk= +github.com/aws/aws-sdk-go-v2/credentials v1.16.8 h1:phw9nRLy/77bPk6Mfu2SHCOnHwfVB7WWrOa5rZIY2Fc= +github.com/aws/aws-sdk-go-v2/credentials v1.16.8/go.mod h1:MrS4SOin6adbO6wgWhdifyPiq+TX7fPPwyA/ZLC1F5M= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.1/go.mod h1:lfUx8puBRdM5lVVMQlwt2v+ofiG/X6Ms+dy0UkG/kXw= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5 h1:KehRNiVzIfAcj6gw98zotVbb/K67taJE0fkfgM6vzqU= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5/go.mod h1:VhnExhw6uXy9QzetvpXDolo1/hjhx4u9qukBGkuUwjs= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8 h1:tQZLSPC2Zj2CqZHonLmWEvCsbpMX5tQvaYJWHadcPek= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8/go.mod h1:5+YpvTHDFffykWr5qAGjqwoh8oVYZOddL3sSrEN7lws= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.59 h1:E3Y+OfzOK1+rmRo/K2G0ml8Vs+Xqk0kOnf4nS0kUtBc= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.59/go.mod h1:1M4PLSBUVfBI0aP+C9XI7SM6kZPCGYyI6izWz0TGprE= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.31/go.mod h1:QT0BqUvX1Bh2ABdTGnjqEjvjzrCfIniM9Sc8zn9Yndo= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 h1:LAm3Ycm9HJfbSCd5I+wqC2S9Ej7FPrgr5CQoOljJZcE= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4/go.mod h1:xEhvbJcyUf/31yfGSQBe01fukXwXJ0gxDp7rLfymWE0= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7 h1:eMqD7ku6WGdmcWWXPYun9m6yk6feSULLhJlAtN6rYG4= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7/go.mod h1:0oBIfcDV6LScxEW0VgOqxT3e4aqKRp+SYhB9wAd5E3Q= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.25/go.mod h1:zBHOPwhBc3FlQjQJE/D3IfPWiWaQmT06Vq9aNukDo0k= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27/go.mod h1:UrHnn3QV/d0pBZ6QBAEQcqFLf8FAzLmoUfPVIueOvoM= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 h1:4GV0kKZzUxiWxSVpn/9gwR0g21NF1Jsyduzo9rHgC/Q= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4/go.mod h1:dYvTNAggxDZy6y1AF7YDwXsPuHFy/VNEpEI/2dWK9IU= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7 h1:+XYhWhgWs5F3Zx8oa49CXzNvfXrItaDjZB/M172fcHQ= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7/go.mod h1:L6tcSRyCGxcKfDWUrmv2jv8G1cLDU7d0FUpEFpG9bVE= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.32/go.mod h1:XGhIBZDEgfqmFIugclZ6FU7v75nHhBDtzuB4xB/tEi4= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34/go.mod h1:Etz2dj6UHYuw+Xw830KfzCfWGMzqvUTCjUj5b76GVDc= github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 h1:uR9lXYjdPX0xY+NhvaJ4dD8rpSRz5VY81ccIIoNG+lw= @@ -359,35 +359,35 @@ github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1/go.mod h1:6fQQgfuGmw8Al/3M2IgIl github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.23 h1:DWYZIsyqagnWL00f8M/SOr9fN063OEQWn9LLTbdYXsk= github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.23/go.mod h1:uIiFgURZbACBEQJfqTZPb/jxO7R+9LeoHUFudtIdeQI= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11/go.mod h1:iV4q2hsqtNECrfmlXyord9u4zyuFEJX9eLgLpSPzWA8= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 h1:rpkF4n0CyFcrJUG/rNNohoTmhtWlFTRI4BsZOh9PvLs= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1/go.mod h1:l9ymW25HOqymeU2m1gbUQ3rUIsTwKs8gYHXkqDQUhiI= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3 h1:e3PCNeEaev/ZF01cQyNZgmYE9oYYePIMJs2mWSKG514= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3/go.mod h1:gIeeNyaL8tIEqZrzAnTeyhHcE0yysCtcaP+N9kxLZ+E= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.26 h1:CeuSeq/8FnYpPtnuIeLQEEvDv9zUjneuYi8EghMBdwQ= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.26/go.mod h1:2UqAAwMUXKeRkAHIlDJqvMVgOWkUi/AUXPk/YIe+Dg4= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.25/go.mod h1:/95IA+0lMnzW6XzqYJRpjjsAbKEORVeO0anQqjd2CNU= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27/go.mod h1:EOwBD4J4S5qYszS5/3DpkejfuK+Z5/1uzICfPaZLtqw= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 h1:rdovz3rEu0vZKbzoMYPTehp0E8veoE9AyfzqCr5Eeao= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4/go.mod h1:aYCGNjyUCUelhofxlZyj63srdxWUSsBSGg5l6MCuXuE= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7 h1:dU+ZyhvqMB/T/TxjGagHMCdyUiqaThRIaMu3YvKiSQI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7/go.mod h1:SGORuNqoXyWfTvTp/gBGJfv8jRvW/+nha0XhnIXVI+o= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.0 h1:e2ooMhpYGhDnBfSvIyusvAwX7KexuZaHbQY2Dyei7VU= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.0/go.mod h1:bh2E0CXKZsQN+faiKVqC40vfNMAWheoULBCnEgO9K+8= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.23.0 h1:RvZSZVBFjF2x4mJ5OqLFmtoJA5KIhlhgEGs9kteIusE= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.23.0/go.mod h1:+ad1py1y3c7ohCbA4zDO6UQ5AALnL+C801tG88bKc40= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.24.1 h1:EOEDoN6rIDbFN3WrzzYwj82H7zqw+qXXirfnOl/ZPDU= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.24.1/go.mod h1:qThvXq8d2PpR9W5n+UJMM0B47AB6sGIwp/bedko7I9k= github.com/aws/aws-sdk-go-v2/service/s3 v1.31.0 h1:B1G2pSPvbAtQjilPq+Y7jLIzCOwKzuVEl+aBBaNG0AQ= github.com/aws/aws-sdk-go-v2/service/s3 v1.31.0/go.mod h1:ncltU6n4Nof5uJttDtcNQ537uNuwYqsZZQcpkd2/GUQ= github.com/aws/aws-sdk-go-v2/service/sso v1.12.6/go.mod h1:Y1VOmit/Fn6Tz1uFAeCO6Q7M2fmfXSCLeL5INVYsLuY= 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.17.3 h1:CdsSOGlFF3Pn+koXOIpTtvX7st0IuGsZ8kJqcWMlX54= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.3/go.mod h1:oA6VjNsLll2eVuUoF2D+CMyORgNzPEW/3PyUdq6WQjI= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.1 h1:V40g2daNO3l1J94JYwqfkyvQMYXi5I25fs3fNQW8iDs= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.1/go.mod h1:0ZWQJP/mBOUxkCvZKybZNz1XmdUKSBxoF0dzgfxtvDs= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.6/go.mod h1:Lh/bc9XUf8CfOY6Jp5aIkQtN+j1mc+nExc+KXj9jx2s= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10/go.mod h1:AFvkxc8xfBe8XA+5St5XIHHrQQtkxqrRincx4hmMHOk= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 h1:cbRqFTVnJV+KRpwFl76GJdIZJKKCdTPnjUZ7uWh3pIU= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1/go.mod h1:hHL974p5auvXlZPIjJTblXJpbkfK4klBczlsEaMCGVY= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1 h1:uQrj7SpUNC3r55vc1CDh3qV9wJC66lz546xM9dhSo5s= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1/go.mod h1:oyaTk5xEAOuPXX1kCD7HmIeuLqdj3Bk5yGkqGXtGi14= github.com/aws/aws-sdk-go-v2/service/sts v1.18.7/go.mod h1:JuTnSoeePXmMVe9G8NcjjwgOKEfZ4cOjMuT2IBT/2eI= github.com/aws/aws-sdk-go-v2/service/sts v1.19.0/go.mod h1:BgQOMsg8av8jset59jelyPW7NoZcZXLVpDsXunGDrk8= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.4 h1:yEvZ4neOQ/KpUqyR+X0ycUTW/kVRNR4nDZ38wStHGAA= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.4/go.mod h1:feTnm2Tk/pJxdX+eooEsxvlvTWBvDm6CasRZ+JOs2IY= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.1 h1:K33V7L0XDdb23FMOZySr8bon1jou5SHn1fiv7NJ1SUg= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.1/go.mod h1:YtXUl/sfnS06VksYhr855hTQf2HphfT1Xv/EwuzbPjg= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= -github.com/aws/smithy-go v1.17.0 h1:wWJD7LX6PBV6etBUwO0zElG0nWN9rUhp0WdYeHSHAaI= -github.com/aws/smithy-go v1.17.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= +github.com/aws/smithy-go v1.18.1 h1:pOdBTUfXNazOlxLrgeYalVnuTpKreACHtc62xLwIB3c= +github.com/aws/smithy-go v1.18.1/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= github.com/basgys/goxml2json v1.1.0 h1:4ln5i4rseYfXNd86lGEB+Vi652IsIXIvggKM/BhUKVw= github.com/beefsack/go-rate v0.0.0-20220214233405-116f4ca011a0/go.mod h1:6YNgTHLutezwnBvyneBbwvB8C82y3dcoOj5EQJIdGXA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -583,7 +583,7 @@ github.com/frankban/quicktest v1.10.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P github.com/frankban/quicktest v1.11.0/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/frankban/quicktest v1.11.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/frankban/quicktest v1.13.0/go.mod h1:qLE0fzW0VuyUAJgPU19zByoIr0HtCHN/r/VLSOOIySU= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= @@ -1421,8 +1421,8 @@ github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 h1:32k2QLgsKhcEs55q4REP github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3/go.mod h1:gJrXWi7wSGXfiC7+VheQaz+ypdCt5SmZNL+BRxUe7y4= github.com/signalfx/sapm-proto v0.13.0 h1:yEkp1+MAU4vZvnJMp56uhVlRjlvCK7KQjBg0g2Apw8k= github.com/signalfx/sapm-proto v0.13.0/go.mod h1:C72HjeCW5v0Llk6pIVJ/ZH8A5GbiZpCCSkE1dSlpWxY= -github.com/sijms/go-ora/v2 v2.7.22 h1:B2mSLhDDWTgsjdM0d/O7iJn041cBy5z7fA8sR082vCg= -github.com/sijms/go-ora/v2 v2.7.22/go.mod h1:EHxlY6x7y9HAsdfumurRfTd+v8NrEOTR3Xl4FWlH6xk= +github.com/sijms/go-ora/v2 v2.7.23 h1:a9/7sm4bOnIhwcxMcilRAADxabLh90tMiryfMVslcK8= +github.com/sijms/go-ora/v2 v2.7.23/go.mod h1:EHxlY6x7y9HAsdfumurRfTd+v8NrEOTR3Xl4FWlH6xk= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -1450,8 +1450,8 @@ github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= @@ -1493,8 +1493,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.802 h1:Oxtoc+JC1CjCcLJbmw9AWspiG8184A9CWFe1mujWoW8= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.802/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.807 h1:L/frkQ4e34Q9WsVJn+666Mk3WmJQuAwBKOs5198c/So= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.807/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/testcontainers/testcontainers-go v0.26.0 h1:uqcYdoOHBy1ca7gKODfBd9uTHVK3a7UL848z09MVZ0c= github.com/tg123/go-htpasswd v1.2.1 h1:i4wfsX1KvvkyoMiHZzjS0VzbAPWfxzI8INcZAKtutoU= github.com/tg123/go-htpasswd v1.2.1/go.mod h1:erHp1B86KXdwQf1X5ZrLb7erXZnWueEQezb2dql4q58= @@ -1536,7 +1536,7 @@ github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852 h1:cPXZWzzG0 github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae h1:4hwBBUfQCFe3Cym0ZtKyq7L16eZUtYKs+BaHDN6mAns= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= -github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= +github.com/vmihailenco/msgpack/v4 v4.3.13 h1:A2wsiTbvp63ilDaWmsk2wjx6xZdxQOvpiNlKBGKKXKI= github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= github.com/vmware/go-vmware-nsxt v0.0.0-20230223012718-d31b8a1ca05e h1:Vu41Q0Pv3yMdd+tcDW6QeEUIK2L+9ZrPrq8NAMrKSLc= github.com/vmware/go-vmware-nsxt v0.0.0-20230223012718-d31b8a1ca05e/go.mod h1:aRq5pxwgdJpAuP97SCjX1+Db32z/b0dggQ07FDF+fqE= diff --git a/cmd/otelcontribcol/receivers_test.go b/cmd/otelcontribcol/receivers_test.go index a33ecc5fbc7c..144f3f6d9122 100644 --- a/cmd/otelcontribcol/receivers_test.go +++ b/cmd/otelcontribcol/receivers_test.go @@ -1,10 +1,6 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -// Skip tests on Windows temporarily, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/11451 -//go:build !windows -// +build !windows - package main import ( @@ -41,6 +37,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/tcplogreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/udplogreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/webhookeventreceiver" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver" ) func TestDefaultReceivers(t *testing.T) { @@ -50,13 +47,13 @@ func TestDefaultReceivers(t *testing.T) { rcvrFactories := allFactories.Receivers tests := []struct { - getConfigFn getReceiverConfigFn - receiver component.Type - skipLifecyle bool + getConfigFn getReceiverConfigFn + receiver component.Type + skipLifecycle bool }{ { - receiver: "active_directory_ds", - skipLifecyle: true, // Requires a running windows service + receiver: "active_directory_ds", + skipLifecycle: true, // Requires a running windows service }, { receiver: "aerospike", @@ -79,18 +76,18 @@ func TestDefaultReceivers(t *testing.T) { { receiver: "awscontainerinsightreceiver", // TODO: skipped since it will only function in a container environment with procfs in expected location. - skipLifecyle: true, + skipLifecycle: true, }, { - receiver: "awsecscontainermetrics", - skipLifecyle: true, // Requires container metaendpoint to be running + receiver: "awsecscontainermetrics", + skipLifecycle: true, // Requires container metaendpoint to be running }, { receiver: "awsfirehose", }, { - receiver: "awsxray", - skipLifecyle: true, // Requires AWS endpoint to check identity to run + receiver: "awsxray", + skipLifecycle: true, // Requires AWS endpoint to check identity to run }, { receiver: "azureblob", @@ -100,7 +97,7 @@ func TestDefaultReceivers(t *testing.T) { cfg.EventHub.EndPoint = "DefaultEndpointsProtocol=http;SharedAccessKeyName=secret;SharedAccessKey=secret;Endpoint=test.test" return cfg }, - skipLifecyle: true, // Requires Azure event hub to run + skipLifecycle: true, // Requires Azure event hub to run }, { receiver: "azureeventhub", @@ -109,7 +106,7 @@ func TestDefaultReceivers(t *testing.T) { cfg.Connection = "Endpoint=sb://example.com/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=superSecret1234=;EntityPath=hubName" return cfg }, - skipLifecyle: true, // Requires Azure event hub to run + skipLifecycle: true, // Requires Azure event hub to run }, { receiver: "azuremonitor", @@ -121,7 +118,7 @@ func TestDefaultReceivers(t *testing.T) { cfg.ClientSecret = "client_secret" return cfg }, - skipLifecyle: true, // Requires Azure event hub to run + skipLifecycle: true, // Requires Azure event hub to run }, { receiver: "bigip", @@ -133,15 +130,15 @@ func TestDefaultReceivers(t *testing.T) { cfg.Endpoint = "0.0.0.0:0" return cfg }, - skipLifecyle: true, // Panics after test have completed, requires a wait group + skipLifecycle: true, // Panics after test have completed, requires a wait group }, { - receiver: "cloudflare", - skipLifecyle: true, + receiver: "cloudflare", + skipLifecycle: true, }, { - receiver: "cloudfoundry", - skipLifecyle: true, // Requires UAA (auth) endpoint to run + receiver: "cloudfoundry", + skipLifecycle: true, // Requires UAA (auth) endpoint to run }, { receiver: "chrony", @@ -166,8 +163,8 @@ func TestDefaultReceivers(t *testing.T) { }, }, { - receiver: "docker_stats", - skipLifecyle: true, + receiver: "docker_stats", + skipLifecycle: true, }, { receiver: "elasticsearch", @@ -184,8 +181,8 @@ func TestDefaultReceivers(t *testing.T) { }, }, { - receiver: "file", - skipLifecyle: true, // Requires an existing JSONL file + receiver: "file", + skipLifecycle: true, // Requires an existing JSONL file }, { receiver: "filestats", @@ -200,8 +197,8 @@ func TestDefaultReceivers(t *testing.T) { receiver: "googlecloudspanner", }, { - receiver: "googlecloudpubsub", - skipLifecyle: true, // Requires a pubsub subscription + receiver: "googlecloudpubsub", + skipLifecycle: true, // Requires a pubsub subscription }, { receiver: "haproxy", @@ -216,15 +213,15 @@ func TestDefaultReceivers(t *testing.T) { receiver: "influxdb", }, { - receiver: "iis", - skipLifecyle: true, // Requires a running windows process + receiver: "iis", + skipLifecycle: true, // Requires a running windows process }, { receiver: "jaeger", }, { - receiver: "jmx", - skipLifecyle: true, // Requires a running instance with JMX + receiver: "jmx", + skipLifecycle: true, // Requires a running instance with JMX getConfigFn: func() component.Config { cfg := jmxreceiver.NewFactory().CreateDefaultConfig().(*jmxreceiver.Config) cfg.Endpoint = "localhost:1234" @@ -233,31 +230,31 @@ func TestDefaultReceivers(t *testing.T) { }, }, { - receiver: "journald", - skipLifecyle: runtime.GOOS != "linux", + receiver: "journald", + skipLifecycle: runtime.GOOS != "linux", }, { - receiver: "k8s_events", - skipLifecyle: true, // need a valid Kubernetes host and port + receiver: "k8s_events", + skipLifecycle: true, // need a valid Kubernetes host and port }, { - receiver: "k8sobjects", - skipLifecyle: true, // need a valid Kubernetes host and port + receiver: "k8sobjects", + skipLifecycle: true, // need a valid Kubernetes host and port }, { - receiver: "kafka", - skipLifecyle: true, // TODO: It needs access to internals to successful start. + receiver: "kafka", + skipLifecycle: true, // TODO: It needs access to internals to successful start. }, { receiver: "kafkametrics", }, { - receiver: "k8s_cluster", - skipLifecyle: true, // Requires access to the k8s host and port in order to run + receiver: "k8s_cluster", + skipLifecycle: true, // Requires access to the k8s host and port in order to run }, { - receiver: "kubeletstats", - skipLifecyle: true, // Requires access to certificates to auth against kubelet + receiver: "kubeletstats", + skipLifecycle: true, // Requires access to certificates to auth against kubelet }, { receiver: "loki", @@ -266,8 +263,8 @@ func TestDefaultReceivers(t *testing.T) { receiver: "memcached", }, { - receiver: "mongodb", - skipLifecyle: true, // Causes tests to timeout + receiver: "mongodb", + skipLifecycle: true, // Causes tests to timeout }, { receiver: "mongodbatlas", @@ -287,8 +284,8 @@ func TestDefaultReceivers(t *testing.T) { receiver: "nsxt", }, { - receiver: "opencensus", - skipLifecyle: true, // TODO: Usage of CMux doesn't allow proper shutdown. + receiver: "opencensus", + skipLifecycle: true, // TODO: Usage of CMux doesn't allow proper shutdown. }, { receiver: "oracledb", @@ -305,8 +302,8 @@ func TestDefaultReceivers(t *testing.T) { }, }, { - receiver: "podman_stats", - skipLifecyle: true, // Requires a running podman daemon + receiver: "podman_stats", + skipLifecycle: true, // Requires a running podman daemon }, { receiver: "postgresql", @@ -324,8 +321,8 @@ func TestDefaultReceivers(t *testing.T) { }, }, { - receiver: "pulsar", - skipLifecyle: true, // TODO It requires a running pulsar instance to start successfully. + receiver: "pulsar", + skipLifecycle: true, // TODO It requires a running pulsar instance to start successfully. }, { receiver: "rabbitmq", @@ -388,19 +385,20 @@ func TestDefaultReceivers(t *testing.T) { receiver: "sqlquery", }, { - receiver: "sqlserver", - skipLifecyle: true, // Requires a running windows process + receiver: "sqlserver", + skipLifecycle: true, // Requires a running windows process }, { - receiver: "sshcheck", + receiver: "sshcheck", + skipLifecycle: runtime.GOOS == "windows", }, { receiver: "statsd", }, { - receiver: "wavefront", - skipLifecyle: true, // Depends on carbon receiver to be running correctly + receiver: "wavefront", + skipLifecycle: true, // Depends on carbon receiver to be running correctly }, { receiver: "webhookevent", @@ -411,12 +409,17 @@ func TestDefaultReceivers(t *testing.T) { }, }, { - receiver: "windowseventlog", - skipLifecyle: true, // Requires a running windows process + receiver: "windowseventlog", + skipLifecycle: runtime.GOOS != "windows", + getConfigFn: func() component.Config { + cfg := rcvrFactories["windowseventlog"].CreateDefaultConfig().(*windowseventlogreceiver.WindowsLogConfig) + cfg.InputConfig.Channel = "Application" + return cfg + }, }, { - receiver: "windowsperfcounters", - skipLifecyle: true, // Requires a running windows process + receiver: "windowsperfcounters", + skipLifecycle: runtime.GOOS != "windows", }, { receiver: "zipkin", @@ -454,8 +457,8 @@ func TestDefaultReceivers(t *testing.T) { receiver: "vcenter", }, { - receiver: "solace", - skipLifecyle: true, // Requires a solace broker to connect to + receiver: "solace", + skipLifecycle: true, // Requires a solace broker to connect to }, } @@ -469,7 +472,7 @@ func TestDefaultReceivers(t *testing.T) { verifyReceiverShutdown(t, factory, tt.getConfigFn) }) t.Run("lifecycle", func(t *testing.T) { - if tt.skipLifecyle { + if tt.skipLifecycle { t.SkipNow() } verifyReceiverLifecycle(t, factory, tt.getConfigFn) diff --git a/cmd/telemetrygen/internal/e2etest/go.mod b/cmd/telemetrygen/internal/e2etest/go.mod index afe434f23b8f..aac6d7630737 100644 --- a/cmd/telemetrygen/internal/e2etest/go.mod +++ b/cmd/telemetrygen/internal/e2etest/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen v0.89.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.89.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.90.0 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/component v0.90.0 go.opentelemetry.io/collector/consumer v0.90.0 diff --git a/confmap/provider/s3provider/go.mod b/confmap/provider/s3provider/go.mod index d96705fe036f..9c2b2ec6e6b5 100644 --- a/confmap/provider/s3provider/go.mod +++ b/confmap/provider/s3provider/go.mod @@ -3,30 +3,30 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provide go 1.20 require ( - github.com/aws/aws-sdk-go-v2 v1.23.1 - github.com/aws/aws-sdk-go-v2/config v1.25.5 - github.com/aws/aws-sdk-go-v2/service/s3 v1.45.0 + github.com/aws/aws-sdk-go-v2 v1.23.4 + github.com/aws/aws-sdk-go-v2/config v1.25.10 + github.com/aws/aws-sdk-go-v2/service/s3 v1.47.1 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/confmap v0.90.0 gopkg.in/yaml.v2 v2.4.0 ) require ( - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.16.4 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.16.8 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 // indirect - github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.4 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.17.3 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.25.4 // indirect - github.com/aws/smithy-go v1.17.0 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.7 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.7 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.7 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.18.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.26.1 // indirect + github.com/aws/smithy-go v1.18.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/hashicorp/go-version v1.6.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 feb2567731a9..b1241700325d 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.23.1 h1:qXaFsOOMA+HsZtX8WoCa+gJnbyW7qyFFBlPqvTSzbaI= -github.com/aws/aws-sdk-go-v2 v1.23.1/go.mod h1:i1XDttT4rnf6vxc9AuskLc6s7XBee8rlLilKlc03uAA= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1 h1:ZY3108YtBNq96jNZTICHxN1gSBSbnvIdYwwqnvCV4Mc= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1/go.mod h1:t8PYl/6LzdAqsU4/9tz28V/kU+asFePvpOMkdul0gEQ= -github.com/aws/aws-sdk-go-v2/config v1.25.5 h1:UGKm9hpQS2hoK8CEJ1BzAW8NbUpvwDJJ4lyqXSzu8bk= -github.com/aws/aws-sdk-go-v2/config v1.25.5/go.mod h1:Bf4gDvy4ZcFIK0rqDu1wp9wrubNba2DojiPB2rt6nvI= -github.com/aws/aws-sdk-go-v2/credentials v1.16.4 h1:i7UQYYDSJrtc30RSwJwfBKwLFNnBTiICqAJ0pPdum8E= -github.com/aws/aws-sdk-go-v2/credentials v1.16.4/go.mod h1:Kdh/okh+//vQ/AjEt81CjvkTo64+/zIE4OewP7RpfXk= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5 h1:KehRNiVzIfAcj6gw98zotVbb/K67taJE0fkfgM6vzqU= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5/go.mod h1:VhnExhw6uXy9QzetvpXDolo1/hjhx4u9qukBGkuUwjs= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 h1:LAm3Ycm9HJfbSCd5I+wqC2S9Ej7FPrgr5CQoOljJZcE= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4/go.mod h1:xEhvbJcyUf/31yfGSQBe01fukXwXJ0gxDp7rLfymWE0= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 h1:4GV0kKZzUxiWxSVpn/9gwR0g21NF1Jsyduzo9rHgC/Q= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4/go.mod h1:dYvTNAggxDZy6y1AF7YDwXsPuHFy/VNEpEI/2dWK9IU= +github.com/aws/aws-sdk-go-v2 v1.23.4 h1:2P20ZjH0ouSAu/6yZep8oCmTReathLuEu6dwoqEgjts= +github.com/aws/aws-sdk-go-v2 v1.23.4/go.mod h1:t3szzKfP0NeRU27uBFczDivYJjsmSnqI8kIvKyWb9ds= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3 h1:Zx9+31KyB8wQna6SXFWOewlgoY5uGdDAu6PTOEU3OQI= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3/go.mod h1:zxbEJhRdKTH1nqS2qu6UJ7zGe25xaHxZXaC2CvuQFnA= +github.com/aws/aws-sdk-go-v2/config v1.25.10 h1:qw/e8emDtNufTkrAU86DlQ18DruMyyM7ttW6Lgwp4v0= +github.com/aws/aws-sdk-go-v2/config v1.25.10/go.mod h1:203YiAtb6XyoGxXMPsUVwEcuxCiTQY/r8P27IDjfvMc= +github.com/aws/aws-sdk-go-v2/credentials v1.16.8 h1:phw9nRLy/77bPk6Mfu2SHCOnHwfVB7WWrOa5rZIY2Fc= +github.com/aws/aws-sdk-go-v2/credentials v1.16.8/go.mod h1:MrS4SOin6adbO6wgWhdifyPiq+TX7fPPwyA/ZLC1F5M= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8 h1:tQZLSPC2Zj2CqZHonLmWEvCsbpMX5tQvaYJWHadcPek= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8/go.mod h1:5+YpvTHDFffykWr5qAGjqwoh8oVYZOddL3sSrEN7lws= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7 h1:eMqD7ku6WGdmcWWXPYun9m6yk6feSULLhJlAtN6rYG4= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7/go.mod h1:0oBIfcDV6LScxEW0VgOqxT3e4aqKRp+SYhB9wAd5E3Q= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7 h1:+XYhWhgWs5F3Zx8oa49CXzNvfXrItaDjZB/M172fcHQ= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7/go.mod h1:L6tcSRyCGxcKfDWUrmv2jv8G1cLDU7d0FUpEFpG9bVE= github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 h1:uR9lXYjdPX0xY+NhvaJ4dD8rpSRz5VY81ccIIoNG+lw= github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.4 h1:40Q4X5ebZruRtknEZH/bg91sT5pR853F7/1X9QRbI54= -github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.4/go.mod h1:u77N7eEECzUv7F0xl2gcfK/vzc8wcjWobpy+DcrLJ5E= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 h1:rpkF4n0CyFcrJUG/rNNohoTmhtWlFTRI4BsZOh9PvLs= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1/go.mod h1:l9ymW25HOqymeU2m1gbUQ3rUIsTwKs8gYHXkqDQUhiI= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.4 h1:6DRKQc+9cChgzL5gplRGusI5dBGeiEod4m/pmGbcX48= -github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.4/go.mod h1:s8ORvrW4g4v7IvYKIAoBg17w3GQ+XuwXDXYrQ5SkzU0= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 h1:rdovz3rEu0vZKbzoMYPTehp0E8veoE9AyfzqCr5Eeao= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4/go.mod h1:aYCGNjyUCUelhofxlZyj63srdxWUSsBSGg5l6MCuXuE= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.4 h1:o3DcfCxGDIT20pTbVKVhp3vWXOj/VvgazNJvumWeYW0= -github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.4/go.mod h1:Uy0KVOxuTK2ne+/PKQ+VvEeWmjMMksE17k/2RK/r5oM= -github.com/aws/aws-sdk-go-v2/service/s3 v1.45.0 h1:qm5f24B6bg3BsVdbMd8ODEfKeadBmYlwUi9erqRfv6s= -github.com/aws/aws-sdk-go-v2/service/s3 v1.45.0/go.mod h1:dqJ5JBL0clzgHriH35Amx3LRFY6wNIPUX7QO/BerSBo= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.3 h1:CdsSOGlFF3Pn+koXOIpTtvX7st0IuGsZ8kJqcWMlX54= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.3/go.mod h1:oA6VjNsLll2eVuUoF2D+CMyORgNzPEW/3PyUdq6WQjI= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 h1:cbRqFTVnJV+KRpwFl76GJdIZJKKCdTPnjUZ7uWh3pIU= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1/go.mod h1:hHL974p5auvXlZPIjJTblXJpbkfK4klBczlsEaMCGVY= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.4 h1:yEvZ4neOQ/KpUqyR+X0ycUTW/kVRNR4nDZ38wStHGAA= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.4/go.mod h1:feTnm2Tk/pJxdX+eooEsxvlvTWBvDm6CasRZ+JOs2IY= -github.com/aws/smithy-go v1.17.0 h1:wWJD7LX6PBV6etBUwO0zElG0nWN9rUhp0WdYeHSHAaI= -github.com/aws/smithy-go v1.17.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.7 h1:3VaUNB1LclLomv82VnP5QnxAfowG+Ro4m82+af9wjZ4= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.2.7/go.mod h1:D5i0c+qvEY0LV5F4elFZd+mYnvHQbufCLHNHoBfQR2g= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3 h1:e3PCNeEaev/ZF01cQyNZgmYE9oYYePIMJs2mWSKG514= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3/go.mod h1:gIeeNyaL8tIEqZrzAnTeyhHcE0yysCtcaP+N9kxLZ+E= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.7 h1:Mft1tmIK1fkFS9l9sYVYiN+OdgXeOcQ9ZS3SxKOh3A4= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.2.7/go.mod h1:QWI83fhocxDaN3b74N8rrvET60CBaike5lQ+5sm3OcE= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7 h1:dU+ZyhvqMB/T/TxjGagHMCdyUiqaThRIaMu3YvKiSQI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7/go.mod h1:SGORuNqoXyWfTvTp/gBGJfv8jRvW/+nha0XhnIXVI+o= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.7 h1:ybtGXm0qFVFi0hFUF7eFAVnL3ntl9MO7lrxhhGP7KYU= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.16.7/go.mod h1:BUyWJUKAnNqoEq1LfyQxy+Eh4U8Y3c5w2C6m21f3yvI= +github.com/aws/aws-sdk-go-v2/service/s3 v1.47.1 h1:0/W5F+LlXzKZ7KTsRcD8pugasVnsrjUWmhOsN/LdSFY= +github.com/aws/aws-sdk-go-v2/service/s3 v1.47.1/go.mod h1:TqThLn4bRCn/UYf960hNZgPPjmxc17fQcwmjfuG6D5k= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.1 h1:V40g2daNO3l1J94JYwqfkyvQMYXi5I25fs3fNQW8iDs= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.1/go.mod h1:0ZWQJP/mBOUxkCvZKybZNz1XmdUKSBxoF0dzgfxtvDs= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1 h1:uQrj7SpUNC3r55vc1CDh3qV9wJC66lz546xM9dhSo5s= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1/go.mod h1:oyaTk5xEAOuPXX1kCD7HmIeuLqdj3Bk5yGkqGXtGi14= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.1 h1:K33V7L0XDdb23FMOZySr8bon1jou5SHn1fiv7NJ1SUg= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.1/go.mod h1:YtXUl/sfnS06VksYhr855hTQf2HphfT1Xv/EwuzbPjg= +github.com/aws/smithy-go v1.18.1 h1:pOdBTUfXNazOlxLrgeYalVnuTpKreACHtc62xLwIB3c= +github.com/aws/smithy-go v1.18.1/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= diff --git a/connector/countconnector/config_test.go b/connector/countconnector/config_test.go index 1ee183f3b094..72a5e43d5d82 100644 --- a/connector/countconnector/config_test.go +++ b/connector/countconnector/config_test.go @@ -413,7 +413,7 @@ func TestConfigErrors(t *testing.T) { }, }, }, - expect: fmt.Sprintf("spans condition: metric %q: unable to parse OTTL statement", defaultMetricNameSpans), + expect: fmt.Sprintf("spans condition: metric %q: unable to parse OTTL condition", defaultMetricNameSpans), }, { name: "invalid_condition_spanevent", @@ -425,7 +425,7 @@ func TestConfigErrors(t *testing.T) { }, }, }, - expect: fmt.Sprintf("spanevents condition: metric %q: unable to parse OTTL statement", defaultMetricNameSpanEvents), + expect: fmt.Sprintf("spanevents condition: metric %q: unable to parse OTTL condition", defaultMetricNameSpanEvents), }, { name: "invalid_condition_metric", @@ -437,7 +437,7 @@ func TestConfigErrors(t *testing.T) { }, }, }, - expect: fmt.Sprintf("metrics condition: metric %q: unable to parse OTTL statement", defaultMetricNameMetrics), + expect: fmt.Sprintf("metrics condition: metric %q: unable to parse OTTL condition", defaultMetricNameMetrics), }, { name: "invalid_condition_datapoint", @@ -449,7 +449,7 @@ func TestConfigErrors(t *testing.T) { }, }, }, - expect: fmt.Sprintf("datapoints condition: metric %q: unable to parse OTTL statement", defaultMetricNameDataPoints), + expect: fmt.Sprintf("datapoints condition: metric %q: unable to parse OTTL condition", defaultMetricNameDataPoints), }, { name: "invalid_condition_log", @@ -461,7 +461,7 @@ func TestConfigErrors(t *testing.T) { }, }, }, - expect: fmt.Sprintf("logs condition: metric %q: unable to parse OTTL statement", defaultMetricNameLogs), + expect: fmt.Sprintf("logs condition: metric %q: unable to parse OTTL condition", defaultMetricNameLogs), }, } diff --git a/connector/spanmetricsconnector/README.md b/connector/spanmetricsconnector/README.md index 78e55f9125f7..c90ec50f3677 100644 --- a/connector/spanmetricsconnector/README.md +++ b/connector/spanmetricsconnector/README.md @@ -3,13 +3,14 @@ | Status | | | ------------- |-----------| -| Distributions | [contrib], [grafana], [sumo] | +| Distributions | [contrib], [grafana], [splunk], [sumo] | | Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aconnector%2Fspanmetrics%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aconnector%2Fspanmetrics) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aconnector%2Fspanmetrics%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aconnector%2Fspanmetrics) | | [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@albertteoh](https://www.github.com/albertteoh) | [alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib [grafana]: https://github.com/grafana/agent +[splunk]: https://github.com/signalfx/splunk-otel-collector [sumo]: https://github.com/SumoLogic/sumologic-otel-collector ## Supported Pipeline Types diff --git a/connector/spanmetricsconnector/metadata.yaml b/connector/spanmetricsconnector/metadata.yaml index 44c256214d12..c700c0bf1332 100644 --- a/connector/spanmetricsconnector/metadata.yaml +++ b/connector/spanmetricsconnector/metadata.yaml @@ -4,6 +4,6 @@ status: class: connector stability: alpha: [traces_to_metrics] - distributions: [contrib, sumo, grafana] + distributions: [contrib, sumo, grafana, splunk] codeowners: active: [albertteoh] diff --git a/examples/couchbase/docker-compose.yaml b/examples/couchbase/docker-compose.yaml index 6e29e61412f6..657f555ebfe6 100644 --- a/examples/couchbase/docker-compose.yaml +++ b/examples/couchbase/docker-compose.yaml @@ -10,7 +10,7 @@ services: cpus: "0.50" memory: 1512M opentelemetry-collector-contrib: - image: otel/opentelemetry-collector-contrib:0.89.0 + image: otel/opentelemetry-collector-contrib:0.90.0 command: ["--config=/etc/otel-collector-config.yml"] volumes: - ./otel-collector-config.yaml:/etc/otel-collector-config.yml diff --git a/exporter/awscloudwatchlogsexporter/go.mod b/exporter/awscloudwatchlogsexporter/go.mod index 6fc643b4ec29..a46064d385c8 100644 --- a/exporter/awscloudwatchlogsexporter/go.mod +++ b/exporter/awscloudwatchlogsexporter/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsclo go 1.20 require ( - github.com/aws/aws-sdk-go v1.48.5 + github.com/aws/aws-sdk-go v1.48.9 github.com/cenkalti/backoff/v4 v4.2.1 github.com/google/uuid v1.4.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.90.0 diff --git a/exporter/awscloudwatchlogsexporter/go.sum b/exporter/awscloudwatchlogsexporter/go.sum index fc6cce685c25..ebfb2963fd0b 100644 --- a/exporter/awscloudwatchlogsexporter/go.sum +++ b/exporter/awscloudwatchlogsexporter/go.sum @@ -1,8 +1,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= diff --git a/exporter/awsemfexporter/go.mod b/exporter/awsemfexporter/go.mod index 99d0d7023bb8..1b5635d0e3ef 100644 --- a/exporter/awsemfexporter/go.mod +++ b/exporter/awsemfexporter/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemf go 1.20 require ( - github.com/aws/aws-sdk-go v1.48.5 + github.com/aws/aws-sdk-go v1.48.9 github.com/google/uuid v1.4.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.90.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.90.0 diff --git a/exporter/awsemfexporter/go.sum b/exporter/awsemfexporter/go.sum index 62180092d4a9..a4ecd4a8bd07 100644 --- a/exporter/awsemfexporter/go.sum +++ b/exporter/awsemfexporter/go.sum @@ -1,8 +1,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= diff --git a/exporter/awskinesisexporter/go.mod b/exporter/awskinesisexporter/go.mod index a515c08abe80..e0f5edf6bed1 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.20 require ( - github.com/aws/aws-sdk-go-v2 v1.23.1 - github.com/aws/aws-sdk-go-v2/config v1.25.5 - github.com/aws/aws-sdk-go-v2/credentials v1.16.4 - github.com/aws/aws-sdk-go-v2/service/kinesis v1.23.0 - github.com/aws/aws-sdk-go-v2/service/sts v1.25.4 + github.com/aws/aws-sdk-go-v2 v1.23.4 + github.com/aws/aws-sdk-go-v2/config v1.25.10 + github.com/aws/aws-sdk-go-v2/credentials v1.16.8 + github.com/aws/aws-sdk-go-v2/service/kinesis v1.24.1 + github.com/aws/aws-sdk-go-v2/service/sts v1.26.1 github.com/cenkalti/backoff/v4 v4.2.1 github.com/gogo/protobuf v1.3.2 github.com/google/uuid v1.4.0 @@ -26,16 +26,16 @@ require ( require ( github.com/apache/thrift v0.19.0 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.17.3 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 // indirect - github.com/aws/smithy-go v1.17.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.18.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1 // indirect + github.com/aws/smithy-go v1.18.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/hashicorp/go-version v1.6.0 // indirect diff --git a/exporter/awskinesisexporter/go.sum b/exporter/awskinesisexporter/go.sum index 23516741be7a..71e3319f2c9f 100644 --- a/exporter/awskinesisexporter/go.sum +++ b/exporter/awskinesisexporter/go.sum @@ -4,36 +4,36 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= github.com/apache/thrift v0.19.0 h1:sOqkWPzMj7w6XaYbJQG7m4sGqVolaW/0D28Ln7yPzMk= github.com/apache/thrift v0.19.0/go.mod h1:SUALL216IiaOw2Oy+5Vs9lboJ/t9g40C+G07Dc0QC1I= -github.com/aws/aws-sdk-go-v2 v1.23.1 h1:qXaFsOOMA+HsZtX8WoCa+gJnbyW7qyFFBlPqvTSzbaI= -github.com/aws/aws-sdk-go-v2 v1.23.1/go.mod h1:i1XDttT4rnf6vxc9AuskLc6s7XBee8rlLilKlc03uAA= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1 h1:ZY3108YtBNq96jNZTICHxN1gSBSbnvIdYwwqnvCV4Mc= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1/go.mod h1:t8PYl/6LzdAqsU4/9tz28V/kU+asFePvpOMkdul0gEQ= -github.com/aws/aws-sdk-go-v2/config v1.25.5 h1:UGKm9hpQS2hoK8CEJ1BzAW8NbUpvwDJJ4lyqXSzu8bk= -github.com/aws/aws-sdk-go-v2/config v1.25.5/go.mod h1:Bf4gDvy4ZcFIK0rqDu1wp9wrubNba2DojiPB2rt6nvI= -github.com/aws/aws-sdk-go-v2/credentials v1.16.4 h1:i7UQYYDSJrtc30RSwJwfBKwLFNnBTiICqAJ0pPdum8E= -github.com/aws/aws-sdk-go-v2/credentials v1.16.4/go.mod h1:Kdh/okh+//vQ/AjEt81CjvkTo64+/zIE4OewP7RpfXk= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5 h1:KehRNiVzIfAcj6gw98zotVbb/K67taJE0fkfgM6vzqU= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5/go.mod h1:VhnExhw6uXy9QzetvpXDolo1/hjhx4u9qukBGkuUwjs= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 h1:LAm3Ycm9HJfbSCd5I+wqC2S9Ej7FPrgr5CQoOljJZcE= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4/go.mod h1:xEhvbJcyUf/31yfGSQBe01fukXwXJ0gxDp7rLfymWE0= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 h1:4GV0kKZzUxiWxSVpn/9gwR0g21NF1Jsyduzo9rHgC/Q= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4/go.mod h1:dYvTNAggxDZy6y1AF7YDwXsPuHFy/VNEpEI/2dWK9IU= +github.com/aws/aws-sdk-go-v2 v1.23.4 h1:2P20ZjH0ouSAu/6yZep8oCmTReathLuEu6dwoqEgjts= +github.com/aws/aws-sdk-go-v2 v1.23.4/go.mod h1:t3szzKfP0NeRU27uBFczDivYJjsmSnqI8kIvKyWb9ds= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3 h1:Zx9+31KyB8wQna6SXFWOewlgoY5uGdDAu6PTOEU3OQI= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3/go.mod h1:zxbEJhRdKTH1nqS2qu6UJ7zGe25xaHxZXaC2CvuQFnA= +github.com/aws/aws-sdk-go-v2/config v1.25.10 h1:qw/e8emDtNufTkrAU86DlQ18DruMyyM7ttW6Lgwp4v0= +github.com/aws/aws-sdk-go-v2/config v1.25.10/go.mod h1:203YiAtb6XyoGxXMPsUVwEcuxCiTQY/r8P27IDjfvMc= +github.com/aws/aws-sdk-go-v2/credentials v1.16.8 h1:phw9nRLy/77bPk6Mfu2SHCOnHwfVB7WWrOa5rZIY2Fc= +github.com/aws/aws-sdk-go-v2/credentials v1.16.8/go.mod h1:MrS4SOin6adbO6wgWhdifyPiq+TX7fPPwyA/ZLC1F5M= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8 h1:tQZLSPC2Zj2CqZHonLmWEvCsbpMX5tQvaYJWHadcPek= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8/go.mod h1:5+YpvTHDFffykWr5qAGjqwoh8oVYZOddL3sSrEN7lws= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7 h1:eMqD7ku6WGdmcWWXPYun9m6yk6feSULLhJlAtN6rYG4= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7/go.mod h1:0oBIfcDV6LScxEW0VgOqxT3e4aqKRp+SYhB9wAd5E3Q= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7 h1:+XYhWhgWs5F3Zx8oa49CXzNvfXrItaDjZB/M172fcHQ= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7/go.mod h1:L6tcSRyCGxcKfDWUrmv2jv8G1cLDU7d0FUpEFpG9bVE= github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 h1:uR9lXYjdPX0xY+NhvaJ4dD8rpSRz5VY81ccIIoNG+lw= github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 h1:rpkF4n0CyFcrJUG/rNNohoTmhtWlFTRI4BsZOh9PvLs= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1/go.mod h1:l9ymW25HOqymeU2m1gbUQ3rUIsTwKs8gYHXkqDQUhiI= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 h1:rdovz3rEu0vZKbzoMYPTehp0E8veoE9AyfzqCr5Eeao= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4/go.mod h1:aYCGNjyUCUelhofxlZyj63srdxWUSsBSGg5l6MCuXuE= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.23.0 h1:RvZSZVBFjF2x4mJ5OqLFmtoJA5KIhlhgEGs9kteIusE= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.23.0/go.mod h1:+ad1py1y3c7ohCbA4zDO6UQ5AALnL+C801tG88bKc40= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.3 h1:CdsSOGlFF3Pn+koXOIpTtvX7st0IuGsZ8kJqcWMlX54= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.3/go.mod h1:oA6VjNsLll2eVuUoF2D+CMyORgNzPEW/3PyUdq6WQjI= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 h1:cbRqFTVnJV+KRpwFl76GJdIZJKKCdTPnjUZ7uWh3pIU= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1/go.mod h1:hHL974p5auvXlZPIjJTblXJpbkfK4klBczlsEaMCGVY= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.4 h1:yEvZ4neOQ/KpUqyR+X0ycUTW/kVRNR4nDZ38wStHGAA= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.4/go.mod h1:feTnm2Tk/pJxdX+eooEsxvlvTWBvDm6CasRZ+JOs2IY= -github.com/aws/smithy-go v1.17.0 h1:wWJD7LX6PBV6etBUwO0zElG0nWN9rUhp0WdYeHSHAaI= -github.com/aws/smithy-go v1.17.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3 h1:e3PCNeEaev/ZF01cQyNZgmYE9oYYePIMJs2mWSKG514= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3/go.mod h1:gIeeNyaL8tIEqZrzAnTeyhHcE0yysCtcaP+N9kxLZ+E= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7 h1:dU+ZyhvqMB/T/TxjGagHMCdyUiqaThRIaMu3YvKiSQI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7/go.mod h1:SGORuNqoXyWfTvTp/gBGJfv8jRvW/+nha0XhnIXVI+o= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.24.1 h1:EOEDoN6rIDbFN3WrzzYwj82H7zqw+qXXirfnOl/ZPDU= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.24.1/go.mod h1:qThvXq8d2PpR9W5n+UJMM0B47AB6sGIwp/bedko7I9k= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.1 h1:V40g2daNO3l1J94JYwqfkyvQMYXi5I25fs3fNQW8iDs= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.1/go.mod h1:0ZWQJP/mBOUxkCvZKybZNz1XmdUKSBxoF0dzgfxtvDs= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1 h1:uQrj7SpUNC3r55vc1CDh3qV9wJC66lz546xM9dhSo5s= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1/go.mod h1:oyaTk5xEAOuPXX1kCD7HmIeuLqdj3Bk5yGkqGXtGi14= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.1 h1:K33V7L0XDdb23FMOZySr8bon1jou5SHn1fiv7NJ1SUg= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.1/go.mod h1:YtXUl/sfnS06VksYhr855hTQf2HphfT1Xv/EwuzbPjg= +github.com/aws/smithy-go v1.18.1 h1:pOdBTUfXNazOlxLrgeYalVnuTpKreACHtc62xLwIB3c= +github.com/aws/smithy-go v1.18.1/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= diff --git a/exporter/awss3exporter/go.mod b/exporter/awss3exporter/go.mod index 6a96a68dae5c..b9d65298d8cb 100644 --- a/exporter/awss3exporter/go.mod +++ b/exporter/awss3exporter/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3e go 1.20 require ( - github.com/aws/aws-sdk-go v1.48.5 + github.com/aws/aws-sdk-go v1.48.9 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/component v0.90.0 go.opentelemetry.io/collector/consumer v0.90.0 diff --git a/exporter/awss3exporter/go.sum b/exporter/awss3exporter/go.sum index 1efe25cc0b52..7b7af011e84e 100644 --- a/exporter/awss3exporter/go.sum +++ b/exporter/awss3exporter/go.sum @@ -41,8 +41,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= diff --git a/exporter/awsxrayexporter/go.mod b/exporter/awsxrayexporter/go.mod index 6362592afe9d..784bfb025662 100644 --- a/exporter/awsxrayexporter/go.mod +++ b/exporter/awsxrayexporter/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxra go 1.20 require ( - github.com/aws/aws-sdk-go v1.48.5 + github.com/aws/aws-sdk-go v1.48.9 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.90.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.90.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.90.0 diff --git a/exporter/awsxrayexporter/go.sum b/exporter/awsxrayexporter/go.sum index d162adef9ccc..5711de9fde47 100644 --- a/exporter/awsxrayexporter/go.sum +++ b/exporter/awsxrayexporter/go.sum @@ -1,8 +1,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= diff --git a/exporter/datadogexporter/go.mod b/exporter/datadogexporter/go.mod index cf8562ef49ce..10a4b54ce0da 100644 --- a/exporter/datadogexporter/go.mod +++ b/exporter/datadogexporter/go.mod @@ -15,7 +15,7 @@ require ( github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.8.1 github.com/DataDog/sketches-go v1.4.3 github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.21.0 - github.com/aws/aws-sdk-go v1.48.5 + github.com/aws/aws-sdk-go v1.48.9 github.com/cenkalti/backoff/v4 v4.2.1 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.90.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.90.0 diff --git a/exporter/datadogexporter/go.sum b/exporter/datadogexporter/go.sum index eff7c4b2c21d..e01ad38d6f00 100644 --- a/exporter/datadogexporter/go.sum +++ b/exporter/datadogexporter/go.sum @@ -118,8 +118,8 @@ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= diff --git a/exporter/datadogexporter/integrationtest/go.mod b/exporter/datadogexporter/integrationtest/go.mod index 0202049161f8..7c20e7b54392 100644 --- a/exporter/datadogexporter/integrationtest/go.mod +++ b/exporter/datadogexporter/integrationtest/go.mod @@ -52,7 +52,7 @@ require ( github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.21.0 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/alecthomas/participle/v2 v2.1.0 // indirect - github.com/aws/aws-sdk-go v1.48.5 // indirect + github.com/aws/aws-sdk-go v1.48.9 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect diff --git a/exporter/datadogexporter/integrationtest/go.sum b/exporter/datadogexporter/integrationtest/go.sum index 009fb2c4713a..5ef098635e07 100644 --- a/exporter/datadogexporter/integrationtest/go.sum +++ b/exporter/datadogexporter/integrationtest/go.sum @@ -111,8 +111,8 @@ github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8V github.com/antonmedv/expr v1.15.5 h1:y0Iz3cEwmpRz5/r3w4qQR0MfIqJGdGM1zbhD/v0G5Vg= github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJA= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= diff --git a/exporter/fileexporter/factory_test.go b/exporter/fileexporter/factory_test.go index dfc6712c8a02..0b7a36c89e49 100644 --- a/exporter/fileexporter/factory_test.go +++ b/exporter/fileexporter/factory_test.go @@ -43,6 +43,7 @@ func TestCreateMetricsExporter(t *testing.T) { cfg) assert.NoError(t, err) require.NotNil(t, exp) + assert.NoError(t, exp.Shutdown(context.Background())) } func TestCreateTracesExporter(t *testing.T) { @@ -56,6 +57,7 @@ func TestCreateTracesExporter(t *testing.T) { cfg) assert.NoError(t, err) require.NotNil(t, exp) + assert.NoError(t, exp.Shutdown(context.Background())) } func TestCreateTracesExporterError(t *testing.T) { @@ -80,6 +82,7 @@ func TestCreateLogsExporter(t *testing.T) { cfg) assert.NoError(t, err) require.NotNil(t, exp) + assert.NoError(t, exp.Shutdown(context.Background())) } func TestCreateLogsExporterError(t *testing.T) { @@ -157,6 +160,9 @@ func TestBuildFileWriter(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got, err := buildFileWriter(tt.args.cfg) + defer func() { + assert.NoError(t, got.Close()) + }() assert.NoError(t, err) tt.validate(t, got) }) diff --git a/exporter/fileexporter/file_exporter_test.go b/exporter/fileexporter/file_exporter_test.go index 2b076ec18f23..e813b7ef1598 100644 --- a/exporter/fileexporter/file_exporter_test.go +++ b/exporter/fileexporter/file_exporter_test.go @@ -10,6 +10,7 @@ import ( "errors" "io" "os" + "path/filepath" "sync" "testing" "time" @@ -484,12 +485,7 @@ func TestExportMessageAsBuffer(t *testing.T) { // tempFileName provides a temporary file name for testing. func tempFileName(t *testing.T) string { - tmpfile, err := os.CreateTemp("", "*") - require.NoError(t, err) - require.NoError(t, tmpfile.Close()) - socket := tmpfile.Name() - require.NoError(t, os.Remove(socket)) - return socket + return filepath.Join(t.TempDir(), "fileexporter_test.tmp") } // errorWriter is an io.Writer that will return an error all ways diff --git a/exporter/kafkaexporter/go.mod b/exporter/kafkaexporter/go.mod index ca2b0f1230ce..574ef3207d46 100644 --- a/exporter/kafkaexporter/go.mod +++ b/exporter/kafkaexporter/go.mod @@ -26,7 +26,7 @@ require ( require ( github.com/apache/thrift v0.19.0 // indirect - github.com/aws/aws-sdk-go v1.48.5 // indirect + github.com/aws/aws-sdk-go v1.48.9 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/eapache/go-resiliency v1.4.0 // indirect github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect diff --git a/exporter/kafkaexporter/go.sum b/exporter/kafkaexporter/go.sum index 201c684eb419..83804d54ac51 100644 --- a/exporter/kafkaexporter/go.sum +++ b/exporter/kafkaexporter/go.sum @@ -6,8 +6,8 @@ github.com/IBM/sarama v1.42.1 h1:wugyWa15TDEHh2kvq2gAy1IHLjEjuYOYgXz/ruC/OSQ= github.com/IBM/sarama v1.42.1/go.mod h1:Xxho9HkHd4K/MDUo/T/sOqwtX/17D33++E9Wib6hUdQ= github.com/apache/thrift v0.19.0 h1:sOqkWPzMj7w6XaYbJQG7m4sGqVolaW/0D28Ln7yPzMk= github.com/apache/thrift v0.19.0/go.mod h1:SUALL216IiaOw2Oy+5Vs9lboJ/t9g40C+G07Dc0QC1I= -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= diff --git a/exporter/prometheusremotewriteexporter/exporter.go b/exporter/prometheusremotewriteexporter/exporter.go index cc7a65f294b1..362efaf5f044 100644 --- a/exporter/prometheusremotewriteexporter/exporter.go +++ b/exporter/prometheusremotewriteexporter/exporter.go @@ -226,16 +226,16 @@ func (prwe *prwExporter) export(ctx context.Context, requests []*prompb.WriteReq } func (prwe *prwExporter) execute(ctx context.Context, writeReq *prompb.WriteRequest) error { + // Uses proto.Marshal to convert the WriteRequest into bytes array + data, errMarshal := proto.Marshal(writeReq) + if errMarshal != nil { + return consumererror.NewPermanent(errMarshal) + } + buf := make([]byte, len(data), cap(data)) + compressedData := snappy.Encode(buf, data) + // executeFunc can be used for backoff and non backoff scenarios. executeFunc := func() error { - // Uses proto.Marshal to convert the WriteRequest into bytes array - data, err := proto.Marshal(writeReq) - if err != nil { - return backoff.Permanent(consumererror.NewPermanent(err)) - } - buf := make([]byte, len(data), cap(data)) - compressedData := snappy.Encode(buf, data) - // Create the HTTP POST request to send to the endpoint req, err := http.NewRequestWithContext(ctx, "POST", prwe.endpointURL.String(), bytes.NewReader(compressedData)) if err != nil { diff --git a/exporter/tencentcloudlogserviceexporter/go.mod b/exporter/tencentcloudlogserviceexporter/go.mod index c95b52922870..38d07b41c0e8 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.90.0 github.com/pierrec/lz4 v2.6.1+incompatible github.com/stretchr/testify v1.8.4 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.802 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.807 go.opentelemetry.io/collector/component v0.90.0 go.opentelemetry.io/collector/config/configopaque v0.90.0 go.opentelemetry.io/collector/confmap v0.90.0 diff --git a/exporter/tencentcloudlogserviceexporter/go.sum b/exporter/tencentcloudlogserviceexporter/go.sum index 80af46d6b567..3ea6894b978a 100644 --- a/exporter/tencentcloudlogserviceexporter/go.sum +++ b/exporter/tencentcloudlogserviceexporter/go.sum @@ -103,8 +103,8 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.802 h1:Oxtoc+JC1CjCcLJbmw9AWspiG8184A9CWFe1mujWoW8= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.802/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.807 h1:L/frkQ4e34Q9WsVJn+666Mk3WmJQuAwBKOs5198c/So= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.807/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= diff --git a/extension/awsproxy/go.mod b/extension/awsproxy/go.mod index ebbb18ffa3a6..16c0ad06be97 100644 --- a/extension/awsproxy/go.mod +++ b/extension/awsproxy/go.mod @@ -15,7 +15,7 @@ require ( ) require ( - github.com/aws/aws-sdk-go v1.48.5 // indirect + github.com/aws/aws-sdk-go v1.48.9 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect diff --git a/extension/awsproxy/go.sum b/extension/awsproxy/go.sum index a5bd991e8833..4ca4ec39c921 100644 --- a/extension/awsproxy/go.sum +++ b/extension/awsproxy/go.sum @@ -1,5 +1,5 @@ -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/extension/observer/ecsobserver/go.mod b/extension/observer/ecsobserver/go.mod index 355915a100fd..0e93e0a12ec7 100644 --- a/extension/observer/ecsobserver/go.mod +++ b/extension/observer/ecsobserver/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/obser go 1.20 require ( - github.com/aws/aws-sdk-go v1.48.5 + github.com/aws/aws-sdk-go v1.48.9 github.com/hashicorp/golang-lru v1.0.2 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/component v0.90.0 diff --git a/extension/observer/ecsobserver/go.sum b/extension/observer/ecsobserver/go.sum index 295ef5b511f5..2ecde8d7cea8 100644 --- a/extension/observer/ecsobserver/go.sum +++ b/extension/observer/ecsobserver/go.sum @@ -1,5 +1,5 @@ -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/extension/observer/k8sobserver/extension_test.go b/extension/observer/k8sobserver/extension_test.go index 028849a23ea6..259234e69cbd 100644 --- a/extension/observer/k8sobserver/extension_test.go +++ b/extension/observer/k8sobserver/extension_test.go @@ -43,6 +43,7 @@ func TestNewExtension(t *testing.T) { func TestExtensionObserveServices(t *testing.T) { factory := NewFactory() config := factory.CreateDefaultConfig().(*Config) + config.ObservePods = false // avoid causing data race when multiple test cases running in the same process using podListerWatcher mockServiceHost(t, config) set := extensiontest.NewNopCreateSettings() @@ -213,6 +214,7 @@ func TestExtensionObservePods(t *testing.T) { func TestExtensionObserveNodes(t *testing.T) { factory := NewFactory() config := factory.CreateDefaultConfig().(*Config) + config.ObservePods = false // avoid causing data race when multiple test cases running in the same process using podListerWatcher mockServiceHost(t, config) set := extensiontest.NewNopCreateSettings() diff --git a/extension/opampextension/README.md b/extension/opampextension/README.md index 40ec053883a7..d6ecb6a2f9b3 100644 --- a/extension/opampextension/README.md +++ b/extension/opampextension/README.md @@ -27,6 +27,8 @@ The following settings are optional: - `instance_uid`: A ULID formatted as a 26 character string in canonical representation. Auto-generated on start if missing. Setting this ensures the instance UID remains constant across process restarts. +- `capabilities`: Keys with boolean true/false values that enable a particular OpAMP capability. + - `reports_effective_config`: Whether to enable the OpAMP ReportsEffectiveConfig capability. Default is `true`. ### Example diff --git a/extension/opampextension/config.go b/extension/opampextension/config.go index 6ff9946fc4b3..825c52a9ab1b 100644 --- a/extension/opampextension/config.go +++ b/extension/opampextension/config.go @@ -7,6 +7,7 @@ import ( "errors" "github.com/oklog/ulid/v2" + "github.com/open-telemetry/opamp-go/protobufs" "go.opentelemetry.io/collector/config/configopaque" "go.opentelemetry.io/collector/config/configtls" ) @@ -19,6 +20,25 @@ type Config struct { // InstanceUID is a ULID formatted as a 26 character string in canonical // representation. Auto-generated on start if missing. InstanceUID string `mapstructure:"instance_uid"` + + // Capabilities contains options to enable a particular OpAMP capability + Capabilities Capabilities `mapstructure:"capabilities"` +} + +type Capabilities struct { + // ReportsEffectiveConfig enables the OpAMP ReportsEffectiveConfig Capability. (default: true) + ReportsEffectiveConfig bool `mapstructure:"reports_effective_config"` +} + +func (caps Capabilities) toAgentCapabilities() protobufs.AgentCapabilities { + // All Agents MUST report status. + agentCapabilities := protobufs.AgentCapabilities_AgentCapabilities_ReportsStatus + + if caps.ReportsEffectiveConfig { + agentCapabilities |= protobufs.AgentCapabilities_AgentCapabilities_ReportsEffectiveConfig + } + + return agentCapabilities } // OpAMPServer contains the OpAMP transport configuration. diff --git a/extension/opampextension/config_test.go b/extension/opampextension/config_test.go index 44a33dbcf46e..184c97b387d1 100644 --- a/extension/opampextension/config_test.go +++ b/extension/opampextension/config_test.go @@ -35,6 +35,9 @@ func TestUnmarshalConfig(t *testing.T) { }, }, InstanceUID: "01BX5ZZKBKACTAV9WEVGEMMVRZ", + Capabilities: Capabilities{ + ReportsEffectiveConfig: true, + }, }, cfg) } diff --git a/extension/opampextension/factory.go b/extension/opampextension/factory.go index a468fe48f141..91c39e9a011b 100644 --- a/extension/opampextension/factory.go +++ b/extension/opampextension/factory.go @@ -26,6 +26,9 @@ func createDefaultConfig() component.Config { Server: &OpAMPServer{ WS: &OpAMPWebsocket{}, }, + Capabilities: Capabilities{ + ReportsEffectiveConfig: true, + }, } } diff --git a/extension/opampextension/go.mod b/extension/opampextension/go.mod index 944beeb8c9b2..46a5b79848dd 100644 --- a/extension/opampextension/go.mod +++ b/extension/opampextension/go.mod @@ -15,6 +15,7 @@ require ( go.opentelemetry.io/collector/pdata v1.0.0 go.opentelemetry.io/collector/semconv v0.90.0 go.uber.org/zap v1.26.0 + gopkg.in/yaml.v3 v3.0.1 ) require ( @@ -44,5 +45,4 @@ require ( google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect google.golang.org/grpc v1.59.0 // indirect google.golang.org/protobuf v1.31.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/extension/opampextension/opamp_agent.go b/extension/opampextension/opamp_agent.go index aba04a7edeaf..3fdc4c5348ed 100644 --- a/extension/opampextension/opamp_agent.go +++ b/extension/opampextension/opamp_agent.go @@ -8,6 +8,7 @@ import ( "net/http" "os" "runtime" + "sync" "github.com/google/uuid" "github.com/oklog/ulid/v2" @@ -15,29 +16,13 @@ import ( "github.com/open-telemetry/opamp-go/client/types" "github.com/open-telemetry/opamp-go/protobufs" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/pdata/pcommon" semconv "go.opentelemetry.io/collector/semconv/v1.18.0" "go.uber.org/zap" + "gopkg.in/yaml.v3" ) -// TODO: Replace with https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/27293 -const localConfig = ` -exporters: - otlp: - endpoint: localhost:1111 -receivers: - otlp: - protocols: - grpc: {} - http: {} -service: - pipelines: - traces: - receivers: [otlp] - processors: [] - exporters: [otlp] -` - type opampAgent struct { cfg *Config logger *zap.Logger @@ -47,7 +32,10 @@ type opampAgent struct { instanceID ulid.ULID - effectiveConfig string + eclk sync.RWMutex + effectiveConfig *confmap.Conf + + capabilities Capabilities agentDescription *protobufs.AgentDescription @@ -88,9 +76,7 @@ func (o *opampAgent) Start(_ context.Context, _ component.Host) error { }, OnMessageFunc: o.onMessage, }, - // TODO: Include ReportsEffectiveConfig once the extension has access to the - // collector's effective configuration. - Capabilities: protobufs.AgentCapabilities_AgentCapabilities_ReportsStatus, + Capabilities: o.capabilities.toAgentCapabilities(), } if err := o.createAgentDescription(); err != nil { @@ -121,6 +107,21 @@ func (o *opampAgent) Shutdown(ctx context.Context) error { return o.opampClient.Stop(ctx) } +func (o *opampAgent) NotifyConfig(ctx context.Context, conf *confmap.Conf) error { + if o.capabilities.ReportsEffectiveConfig { + o.updateEffectiveConfig(conf) + return o.opampClient.UpdateEffectiveConfig(ctx) + } + return nil +} + +func (o *opampAgent) updateEffectiveConfig(conf *confmap.Conf) { + o.eclk.Lock() + defer o.eclk.Unlock() + + o.effectiveConfig = conf +} + func newOpampAgent(cfg *Config, logger *zap.Logger, build component.BuildInfo, res pcommon.Resource) (*opampAgent, error) { agentType := build.Command @@ -156,12 +157,12 @@ func newOpampAgent(cfg *Config, logger *zap.Logger, build component.BuildInfo, r } agent := &opampAgent{ - cfg: cfg, - logger: logger, - agentType: agentType, - agentVersion: agentVersion, - instanceID: uid, - effectiveConfig: localConfig, // TODO: Replace with https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/27293 + cfg: cfg, + logger: logger, + agentType: agentType, + agentVersion: agentVersion, + instanceID: uid, + capabilities: cfg.Capabilities, } return agent, nil @@ -210,10 +211,23 @@ func (o *opampAgent) updateAgentIdentity(instanceID ulid.ULID) { } func (o *opampAgent) composeEffectiveConfig() *protobufs.EffectiveConfig { + o.eclk.RLock() + defer o.eclk.RUnlock() + + if !o.capabilities.ReportsEffectiveConfig || o.effectiveConfig == nil { + return nil + } + + conf, err := yaml.Marshal(o.effectiveConfig.ToStringMap()) + if err != nil { + o.logger.Error("cannot unmarshal effectiveConfig", zap.Any("conf", o.effectiveConfig), zap.Error(err)) + return nil + } + return &protobufs.EffectiveConfig{ ConfigMap: &protobufs.AgentConfigMap{ ConfigMap: map[string]*protobufs.AgentConfigFile{ - "": {Body: []byte(o.effectiveConfig)}, + "": {Body: conf}, }, }, } diff --git a/extension/opampextension/opamp_agent_test.go b/extension/opampextension/opamp_agent_test.go index c6bcede0f733..5332d7769f80 100644 --- a/extension/opampextension/opamp_agent_test.go +++ b/extension/opampextension/opamp_agent_test.go @@ -5,12 +5,15 @@ package opampextension import ( "context" + "os" + "path/filepath" "testing" "github.com/oklog/ulid/v2" "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/extension/extensiontest" semconv "go.opentelemetry.io/collector/semconv/v1.18.0" ) @@ -24,7 +27,8 @@ func TestNewOpampAgent(t *testing.T) { assert.Equal(t, "otelcoltest", o.agentType) assert.Equal(t, "test version", o.agentVersion) assert.NotEmpty(t, o.instanceID.String()) - assert.NotEmpty(t, o.effectiveConfig) + assert.True(t, o.capabilities.ReportsEffectiveConfig) + assert.Empty(t, o.effectiveConfig) assert.Nil(t, o.agentDescription) } @@ -75,10 +79,21 @@ func TestComposeEffectiveConfig(t *testing.T) { set := extensiontest.NewNopCreateSettings() o, err := newOpampAgent(cfg.(*Config), set.Logger, set.BuildInfo, set.Resource) assert.NoError(t, err) - assert.NotEmpty(t, o.effectiveConfig) + assert.Empty(t, o.effectiveConfig) ec := o.composeEffectiveConfig() + assert.Nil(t, ec) + + ecFileName := filepath.Join("testdata", "effective.yaml") + cm, err := confmaptest.LoadConf(ecFileName) + assert.NoError(t, err) + expected, err := os.ReadFile(ecFileName) + assert.NoError(t, err) + + o.updateEffectiveConfig(cm) + ec = o.composeEffectiveConfig() assert.NotNil(t, ec) + assert.YAMLEq(t, string(expected), string(ec.ConfigMap.ConfigMap[""].Body)) } func TestShutdown(t *testing.T) { diff --git a/extension/opampextension/testdata/effective.yaml b/extension/opampextension/testdata/effective.yaml new file mode 100644 index 000000000000..69261ddf6dd3 --- /dev/null +++ b/extension/opampextension/testdata/effective.yaml @@ -0,0 +1,14 @@ +exporters: + otlp: + endpoint: localhost:1111 +receivers: + otlp: + protocols: + grpc: {} + http: {} +service: + pipelines: + traces: + receivers: [otlp] + processors: [] + exporters: [otlp] diff --git a/extension/sigv4authextension/go.mod b/extension/sigv4authextension/go.mod index c8aea2e1b973..b194c2501e48 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.20 require ( - github.com/aws/aws-sdk-go-v2 v1.23.1 - github.com/aws/aws-sdk-go-v2/config v1.25.5 - github.com/aws/aws-sdk-go-v2/credentials v1.16.4 - github.com/aws/aws-sdk-go-v2/service/sts v1.25.4 + github.com/aws/aws-sdk-go-v2 v1.23.4 + github.com/aws/aws-sdk-go-v2/config v1.25.10 + github.com/aws/aws-sdk-go-v2/credentials v1.16.8 + github.com/aws/aws-sdk-go-v2/service/sts v1.26.1 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/component v0.90.0 go.opentelemetry.io/collector/confmap v0.90.0 @@ -17,15 +17,15 @@ require ( ) require ( - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.17.3 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 // indirect - github.com/aws/smithy-go v1.17.0 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.18.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1 // indirect + github.com/aws/smithy-go v1.18.1 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.3 // indirect diff --git a/extension/sigv4authextension/go.sum b/extension/sigv4authextension/go.sum index 0270c2b2202a..9d976bfdd28d 100644 --- a/extension/sigv4authextension/go.sum +++ b/extension/sigv4authextension/go.sum @@ -1,29 +1,29 @@ -github.com/aws/aws-sdk-go-v2 v1.23.1 h1:qXaFsOOMA+HsZtX8WoCa+gJnbyW7qyFFBlPqvTSzbaI= -github.com/aws/aws-sdk-go-v2 v1.23.1/go.mod h1:i1XDttT4rnf6vxc9AuskLc6s7XBee8rlLilKlc03uAA= -github.com/aws/aws-sdk-go-v2/config v1.25.5 h1:UGKm9hpQS2hoK8CEJ1BzAW8NbUpvwDJJ4lyqXSzu8bk= -github.com/aws/aws-sdk-go-v2/config v1.25.5/go.mod h1:Bf4gDvy4ZcFIK0rqDu1wp9wrubNba2DojiPB2rt6nvI= -github.com/aws/aws-sdk-go-v2/credentials v1.16.4 h1:i7UQYYDSJrtc30RSwJwfBKwLFNnBTiICqAJ0pPdum8E= -github.com/aws/aws-sdk-go-v2/credentials v1.16.4/go.mod h1:Kdh/okh+//vQ/AjEt81CjvkTo64+/zIE4OewP7RpfXk= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5 h1:KehRNiVzIfAcj6gw98zotVbb/K67taJE0fkfgM6vzqU= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5/go.mod h1:VhnExhw6uXy9QzetvpXDolo1/hjhx4u9qukBGkuUwjs= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 h1:LAm3Ycm9HJfbSCd5I+wqC2S9Ej7FPrgr5CQoOljJZcE= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4/go.mod h1:xEhvbJcyUf/31yfGSQBe01fukXwXJ0gxDp7rLfymWE0= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 h1:4GV0kKZzUxiWxSVpn/9gwR0g21NF1Jsyduzo9rHgC/Q= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4/go.mod h1:dYvTNAggxDZy6y1AF7YDwXsPuHFy/VNEpEI/2dWK9IU= +github.com/aws/aws-sdk-go-v2 v1.23.4 h1:2P20ZjH0ouSAu/6yZep8oCmTReathLuEu6dwoqEgjts= +github.com/aws/aws-sdk-go-v2 v1.23.4/go.mod h1:t3szzKfP0NeRU27uBFczDivYJjsmSnqI8kIvKyWb9ds= +github.com/aws/aws-sdk-go-v2/config v1.25.10 h1:qw/e8emDtNufTkrAU86DlQ18DruMyyM7ttW6Lgwp4v0= +github.com/aws/aws-sdk-go-v2/config v1.25.10/go.mod h1:203YiAtb6XyoGxXMPsUVwEcuxCiTQY/r8P27IDjfvMc= +github.com/aws/aws-sdk-go-v2/credentials v1.16.8 h1:phw9nRLy/77bPk6Mfu2SHCOnHwfVB7WWrOa5rZIY2Fc= +github.com/aws/aws-sdk-go-v2/credentials v1.16.8/go.mod h1:MrS4SOin6adbO6wgWhdifyPiq+TX7fPPwyA/ZLC1F5M= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8 h1:tQZLSPC2Zj2CqZHonLmWEvCsbpMX5tQvaYJWHadcPek= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8/go.mod h1:5+YpvTHDFffykWr5qAGjqwoh8oVYZOddL3sSrEN7lws= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7 h1:eMqD7ku6WGdmcWWXPYun9m6yk6feSULLhJlAtN6rYG4= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7/go.mod h1:0oBIfcDV6LScxEW0VgOqxT3e4aqKRp+SYhB9wAd5E3Q= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7 h1:+XYhWhgWs5F3Zx8oa49CXzNvfXrItaDjZB/M172fcHQ= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7/go.mod h1:L6tcSRyCGxcKfDWUrmv2jv8G1cLDU7d0FUpEFpG9bVE= github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 h1:uR9lXYjdPX0xY+NhvaJ4dD8rpSRz5VY81ccIIoNG+lw= github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1/go.mod h1:6fQQgfuGmw8Al/3M2IgIllycxV7ZW7WCdVSqfBeUiCY= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 h1:rpkF4n0CyFcrJUG/rNNohoTmhtWlFTRI4BsZOh9PvLs= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1/go.mod h1:l9ymW25HOqymeU2m1gbUQ3rUIsTwKs8gYHXkqDQUhiI= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 h1:rdovz3rEu0vZKbzoMYPTehp0E8veoE9AyfzqCr5Eeao= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4/go.mod h1:aYCGNjyUCUelhofxlZyj63srdxWUSsBSGg5l6MCuXuE= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.3 h1:CdsSOGlFF3Pn+koXOIpTtvX7st0IuGsZ8kJqcWMlX54= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.3/go.mod h1:oA6VjNsLll2eVuUoF2D+CMyORgNzPEW/3PyUdq6WQjI= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 h1:cbRqFTVnJV+KRpwFl76GJdIZJKKCdTPnjUZ7uWh3pIU= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1/go.mod h1:hHL974p5auvXlZPIjJTblXJpbkfK4klBczlsEaMCGVY= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.4 h1:yEvZ4neOQ/KpUqyR+X0ycUTW/kVRNR4nDZ38wStHGAA= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.4/go.mod h1:feTnm2Tk/pJxdX+eooEsxvlvTWBvDm6CasRZ+JOs2IY= -github.com/aws/smithy-go v1.17.0 h1:wWJD7LX6PBV6etBUwO0zElG0nWN9rUhp0WdYeHSHAaI= -github.com/aws/smithy-go v1.17.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3 h1:e3PCNeEaev/ZF01cQyNZgmYE9oYYePIMJs2mWSKG514= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3/go.mod h1:gIeeNyaL8tIEqZrzAnTeyhHcE0yysCtcaP+N9kxLZ+E= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7 h1:dU+ZyhvqMB/T/TxjGagHMCdyUiqaThRIaMu3YvKiSQI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7/go.mod h1:SGORuNqoXyWfTvTp/gBGJfv8jRvW/+nha0XhnIXVI+o= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.1 h1:V40g2daNO3l1J94JYwqfkyvQMYXi5I25fs3fNQW8iDs= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.1/go.mod h1:0ZWQJP/mBOUxkCvZKybZNz1XmdUKSBxoF0dzgfxtvDs= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1 h1:uQrj7SpUNC3r55vc1CDh3qV9wJC66lz546xM9dhSo5s= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1/go.mod h1:oyaTk5xEAOuPXX1kCD7HmIeuLqdj3Bk5yGkqGXtGi14= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.1 h1:K33V7L0XDdb23FMOZySr8bon1jou5SHn1fiv7NJ1SUg= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.1/go.mod h1:YtXUl/sfnS06VksYhr855hTQf2HphfT1Xv/EwuzbPjg= +github.com/aws/smithy-go v1.18.1 h1:pOdBTUfXNazOlxLrgeYalVnuTpKreACHtc62xLwIB3c= +github.com/aws/smithy-go v1.18.1/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/go-logr/logr v1.3.0 h1:2y3SDp0ZXuc6/cjLSZ+Q3ir+QB9T/iG5yYRXqsagWSY= diff --git a/go.mod b/go.mod index 9f430e56aeff..92e67c3a2c7c 100644 --- a/go.mod +++ b/go.mod @@ -268,7 +268,7 @@ require ( github.com/Masterminds/semver/v3 v3.2.0 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/ReneKroon/ttlcache/v2 v2.11.0 // indirect - github.com/SAP/go-hdb v1.6.2 // indirect + github.com/SAP/go-hdb v1.6.3 // indirect github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc // indirect github.com/Showmax/go-fqdn v1.0.0 // indirect github.com/aerospike/aerospike-client-go/v6 v6.13.0 // indirect @@ -283,27 +283,27 @@ require ( github.com/apache/thrift v0.19.0 // indirect github.com/ardielle/ardielle-go v1.5.2 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.48.5 // indirect - github.com/aws/aws-sdk-go-v2 v1.23.1 // indirect - github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1 // indirect - github.com/aws/aws-sdk-go-v2/config v1.25.5 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.16.4 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5 // indirect + github.com/aws/aws-sdk-go v1.48.9 // indirect + github.com/aws/aws-sdk-go-v2 v1.23.4 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3 // indirect + github.com/aws/aws-sdk-go-v2/config v1.25.10 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.16.8 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8 // indirect github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.59 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.23 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3 // indirect github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.26 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.0 // indirect - github.com/aws/aws-sdk-go-v2/service/kinesis v1.23.0 // indirect + github.com/aws/aws-sdk-go-v2/service/kinesis v1.24.1 // indirect github.com/aws/aws-sdk-go-v2/service/s3 v1.31.0 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.17.3 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.25.4 // indirect - github.com/aws/smithy-go v1.17.0 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.18.1 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.26.1 // indirect + github.com/aws/smithy-go v1.18.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/bmatcuk/doublestar/v4 v4.6.1 // indirect @@ -584,14 +584,14 @@ require ( github.com/shopspring/decimal v1.3.1 // indirect github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 // indirect github.com/signalfx/sapm-proto v0.13.0 // indirect - github.com/sijms/go-ora/v2 v2.7.22 // indirect + github.com/sijms/go-ora/v2 v2.7.23 // indirect github.com/sirupsen/logrus v1.9.3 // indirect github.com/snowflakedb/gosnowflake v1.7.0 // indirect github.com/soheilhy/cmux v0.1.5 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect github.com/spf13/afero v1.10.0 // indirect - github.com/spf13/cast v1.5.1 // indirect + github.com/spf13/cast v1.6.0 // indirect github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.17.0 // indirect @@ -599,7 +599,7 @@ require ( github.com/stretchr/testify v1.8.4 // 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.803 // indirect + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.807 // indirect github.com/tg123/go-htpasswd v1.2.1 // indirect github.com/tidwall/gjson v1.14.3 // indirect github.com/tidwall/match v1.1.1 // indirect diff --git a/go.sum b/go.sum index 1a27c9432d5f..4978378b06f7 100644 --- a/go.sum +++ b/go.sum @@ -238,8 +238,8 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/ReneKroon/ttlcache/v2 v2.11.0 h1:OvlcYFYi941SBN3v9dsDcC2N8vRxyHcCmJb3Vl4QMoM= github.com/ReneKroon/ttlcache/v2 v2.11.0/go.mod h1:mBxvsNY+BT8qLLd6CuAJubbKo6r0jh3nb5et22bbfGY= -github.com/SAP/go-hdb v1.6.2 h1:sC0OjTEfPnycIktkCDvS7GelaGOiRrhWE0GWUt05QP8= -github.com/SAP/go-hdb v1.6.2/go.mod h1:xXsEywFErhpCuRVQ3HfjI7H7fPLYPMnMTWa9D5Enx0Q= +github.com/SAP/go-hdb v1.6.3 h1:O2DTMCf4vGYG7W6TjrSIezUz7y0mF5j/E6w6ol1pbho= +github.com/SAP/go-hdb v1.6.3/go.mod h1:TKQ0SvP6dwcVKCu4q9yisg5mTtWPoAbc3lLzkgrAC5M= github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2/go.mod h1:ARgCUhI1MHQH+ONky/PAtmVHQrP5JlGY0F3poXOp/fA= github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc h1:MhBvG7RLaLqlyjxMR6of35vt6MVQ+eXMcgn9X/sy0FE= github.com/SermoDigital/jose v0.9.2-0.20180104203859-803625baeddc/go.mod h1:ARgCUhI1MHQH+ONky/PAtmVHQrP5JlGY0F3poXOp/fA= @@ -326,38 +326,38 @@ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN github.com/aws/aws-sdk-go v1.32.6/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.44.263/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.17.7/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2 v1.18.0/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= -github.com/aws/aws-sdk-go-v2 v1.23.1 h1:qXaFsOOMA+HsZtX8WoCa+gJnbyW7qyFFBlPqvTSzbaI= -github.com/aws/aws-sdk-go-v2 v1.23.1/go.mod h1:i1XDttT4rnf6vxc9AuskLc6s7XBee8rlLilKlc03uAA= +github.com/aws/aws-sdk-go-v2 v1.23.4 h1:2P20ZjH0ouSAu/6yZep8oCmTReathLuEu6dwoqEgjts= +github.com/aws/aws-sdk-go-v2 v1.23.4/go.mod h1:t3szzKfP0NeRU27uBFczDivYJjsmSnqI8kIvKyWb9ds= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10/go.mod h1:VeTZetY5KRJLuD/7fkQXMU6Mw7H5m/KP2J5Iy9osMno= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1 h1:ZY3108YtBNq96jNZTICHxN1gSBSbnvIdYwwqnvCV4Mc= -github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.1/go.mod h1:t8PYl/6LzdAqsU4/9tz28V/kU+asFePvpOMkdul0gEQ= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3 h1:Zx9+31KyB8wQna6SXFWOewlgoY5uGdDAu6PTOEU3OQI= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.5.3/go.mod h1:zxbEJhRdKTH1nqS2qu6UJ7zGe25xaHxZXaC2CvuQFnA= github.com/aws/aws-sdk-go-v2/config v1.18.19/go.mod h1:XvTmGMY8d52ougvakOv1RpiTLPz9dlG/OQHsKU/cMmY= github.com/aws/aws-sdk-go-v2/config v1.18.25/go.mod h1:dZnYpD5wTW/dQF0rRNLVypB396zWCcPiBIvdvSWHEg4= -github.com/aws/aws-sdk-go-v2/config v1.25.5 h1:UGKm9hpQS2hoK8CEJ1BzAW8NbUpvwDJJ4lyqXSzu8bk= -github.com/aws/aws-sdk-go-v2/config v1.25.5/go.mod h1:Bf4gDvy4ZcFIK0rqDu1wp9wrubNba2DojiPB2rt6nvI= +github.com/aws/aws-sdk-go-v2/config v1.25.10 h1:qw/e8emDtNufTkrAU86DlQ18DruMyyM7ttW6Lgwp4v0= +github.com/aws/aws-sdk-go-v2/config v1.25.10/go.mod h1:203YiAtb6XyoGxXMPsUVwEcuxCiTQY/r8P27IDjfvMc= github.com/aws/aws-sdk-go-v2/credentials v1.13.18/go.mod h1:vnwlwjIe+3XJPBYKu1et30ZPABG3VaXJYr8ryohpIyM= github.com/aws/aws-sdk-go-v2/credentials v1.13.24/go.mod h1:jYPYi99wUOPIFi0rhiOvXeSEReVOzBqFNOX5bXYoG2o= -github.com/aws/aws-sdk-go-v2/credentials v1.16.4 h1:i7UQYYDSJrtc30RSwJwfBKwLFNnBTiICqAJ0pPdum8E= -github.com/aws/aws-sdk-go-v2/credentials v1.16.4/go.mod h1:Kdh/okh+//vQ/AjEt81CjvkTo64+/zIE4OewP7RpfXk= +github.com/aws/aws-sdk-go-v2/credentials v1.16.8 h1:phw9nRLy/77bPk6Mfu2SHCOnHwfVB7WWrOa5rZIY2Fc= +github.com/aws/aws-sdk-go-v2/credentials v1.16.8/go.mod h1:MrS4SOin6adbO6wgWhdifyPiq+TX7fPPwyA/ZLC1F5M= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.1/go.mod h1:lfUx8puBRdM5lVVMQlwt2v+ofiG/X6Ms+dy0UkG/kXw= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.3/go.mod h1:4Q0UFP0YJf0NrsEuEYHpM9fTSEVnD16Z3uyEF7J9JGM= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5 h1:KehRNiVzIfAcj6gw98zotVbb/K67taJE0fkfgM6vzqU= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.5/go.mod h1:VhnExhw6uXy9QzetvpXDolo1/hjhx4u9qukBGkuUwjs= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8 h1:tQZLSPC2Zj2CqZHonLmWEvCsbpMX5tQvaYJWHadcPek= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.14.8/go.mod h1:5+YpvTHDFffykWr5qAGjqwoh8oVYZOddL3sSrEN7lws= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.59 h1:E3Y+OfzOK1+rmRo/K2G0ml8Vs+Xqk0kOnf4nS0kUtBc= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.59/go.mod h1:1M4PLSBUVfBI0aP+C9XI7SM6kZPCGYyI6izWz0TGprE= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.31/go.mod h1:QT0BqUvX1Bh2ABdTGnjqEjvjzrCfIniM9Sc8zn9Yndo= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.33/go.mod h1:7i0PF1ME/2eUPFcjkVIwq+DOygHEoK92t5cDqNgYbIw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4 h1:LAm3Ycm9HJfbSCd5I+wqC2S9Ej7FPrgr5CQoOljJZcE= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.4/go.mod h1:xEhvbJcyUf/31yfGSQBe01fukXwXJ0gxDp7rLfymWE0= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7 h1:eMqD7ku6WGdmcWWXPYun9m6yk6feSULLhJlAtN6rYG4= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.2.7/go.mod h1:0oBIfcDV6LScxEW0VgOqxT3e4aqKRp+SYhB9wAd5E3Q= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.25/go.mod h1:zBHOPwhBc3FlQjQJE/D3IfPWiWaQmT06Vq9aNukDo0k= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.27/go.mod h1:UrHnn3QV/d0pBZ6QBAEQcqFLf8FAzLmoUfPVIueOvoM= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4 h1:4GV0kKZzUxiWxSVpn/9gwR0g21NF1Jsyduzo9rHgC/Q= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.4/go.mod h1:dYvTNAggxDZy6y1AF7YDwXsPuHFy/VNEpEI/2dWK9IU= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7 h1:+XYhWhgWs5F3Zx8oa49CXzNvfXrItaDjZB/M172fcHQ= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.5.7/go.mod h1:L6tcSRyCGxcKfDWUrmv2jv8G1cLDU7d0FUpEFpG9bVE= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.32/go.mod h1:XGhIBZDEgfqmFIugclZ6FU7v75nHhBDtzuB4xB/tEi4= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.34/go.mod h1:Etz2dj6UHYuw+Xw830KfzCfWGMzqvUTCjUj5b76GVDc= github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1 h1:uR9lXYjdPX0xY+NhvaJ4dD8rpSRz5VY81ccIIoNG+lw= @@ -365,35 +365,35 @@ github.com/aws/aws-sdk-go-v2/internal/ini v1.7.1/go.mod h1:6fQQgfuGmw8Al/3M2IgIl github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.23 h1:DWYZIsyqagnWL00f8M/SOr9fN063OEQWn9LLTbdYXsk= github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.23/go.mod h1:uIiFgURZbACBEQJfqTZPb/jxO7R+9LeoHUFudtIdeQI= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11/go.mod h1:iV4q2hsqtNECrfmlXyord9u4zyuFEJX9eLgLpSPzWA8= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1 h1:rpkF4n0CyFcrJUG/rNNohoTmhtWlFTRI4BsZOh9PvLs= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.1/go.mod h1:l9ymW25HOqymeU2m1gbUQ3rUIsTwKs8gYHXkqDQUhiI= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3 h1:e3PCNeEaev/ZF01cQyNZgmYE9oYYePIMJs2mWSKG514= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.10.3/go.mod h1:gIeeNyaL8tIEqZrzAnTeyhHcE0yysCtcaP+N9kxLZ+E= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.26 h1:CeuSeq/8FnYpPtnuIeLQEEvDv9zUjneuYi8EghMBdwQ= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.26/go.mod h1:2UqAAwMUXKeRkAHIlDJqvMVgOWkUi/AUXPk/YIe+Dg4= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.25/go.mod h1:/95IA+0lMnzW6XzqYJRpjjsAbKEORVeO0anQqjd2CNU= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.27/go.mod h1:EOwBD4J4S5qYszS5/3DpkejfuK+Z5/1uzICfPaZLtqw= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4 h1:rdovz3rEu0vZKbzoMYPTehp0E8veoE9AyfzqCr5Eeao= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.4/go.mod h1:aYCGNjyUCUelhofxlZyj63srdxWUSsBSGg5l6MCuXuE= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7 h1:dU+ZyhvqMB/T/TxjGagHMCdyUiqaThRIaMu3YvKiSQI= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.10.7/go.mod h1:SGORuNqoXyWfTvTp/gBGJfv8jRvW/+nha0XhnIXVI+o= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.0 h1:e2ooMhpYGhDnBfSvIyusvAwX7KexuZaHbQY2Dyei7VU= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.0/go.mod h1:bh2E0CXKZsQN+faiKVqC40vfNMAWheoULBCnEgO9K+8= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.23.0 h1:RvZSZVBFjF2x4mJ5OqLFmtoJA5KIhlhgEGs9kteIusE= -github.com/aws/aws-sdk-go-v2/service/kinesis v1.23.0/go.mod h1:+ad1py1y3c7ohCbA4zDO6UQ5AALnL+C801tG88bKc40= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.24.1 h1:EOEDoN6rIDbFN3WrzzYwj82H7zqw+qXXirfnOl/ZPDU= +github.com/aws/aws-sdk-go-v2/service/kinesis v1.24.1/go.mod h1:qThvXq8d2PpR9W5n+UJMM0B47AB6sGIwp/bedko7I9k= github.com/aws/aws-sdk-go-v2/service/s3 v1.31.0 h1:B1G2pSPvbAtQjilPq+Y7jLIzCOwKzuVEl+aBBaNG0AQ= github.com/aws/aws-sdk-go-v2/service/s3 v1.31.0/go.mod h1:ncltU6n4Nof5uJttDtcNQ537uNuwYqsZZQcpkd2/GUQ= github.com/aws/aws-sdk-go-v2/service/sso v1.12.6/go.mod h1:Y1VOmit/Fn6Tz1uFAeCO6Q7M2fmfXSCLeL5INVYsLuY= 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.17.3 h1:CdsSOGlFF3Pn+koXOIpTtvX7st0IuGsZ8kJqcWMlX54= -github.com/aws/aws-sdk-go-v2/service/sso v1.17.3/go.mod h1:oA6VjNsLll2eVuUoF2D+CMyORgNzPEW/3PyUdq6WQjI= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.1 h1:V40g2daNO3l1J94JYwqfkyvQMYXi5I25fs3fNQW8iDs= +github.com/aws/aws-sdk-go-v2/service/sso v1.18.1/go.mod h1:0ZWQJP/mBOUxkCvZKybZNz1XmdUKSBxoF0dzgfxtvDs= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.6/go.mod h1:Lh/bc9XUf8CfOY6Jp5aIkQtN+j1mc+nExc+KXj9jx2s= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.10/go.mod h1:AFvkxc8xfBe8XA+5St5XIHHrQQtkxqrRincx4hmMHOk= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1 h1:cbRqFTVnJV+KRpwFl76GJdIZJKKCdTPnjUZ7uWh3pIU= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.20.1/go.mod h1:hHL974p5auvXlZPIjJTblXJpbkfK4klBczlsEaMCGVY= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1 h1:uQrj7SpUNC3r55vc1CDh3qV9wJC66lz546xM9dhSo5s= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.21.1/go.mod h1:oyaTk5xEAOuPXX1kCD7HmIeuLqdj3Bk5yGkqGXtGi14= github.com/aws/aws-sdk-go-v2/service/sts v1.18.7/go.mod h1:JuTnSoeePXmMVe9G8NcjjwgOKEfZ4cOjMuT2IBT/2eI= github.com/aws/aws-sdk-go-v2/service/sts v1.19.0/go.mod h1:BgQOMsg8av8jset59jelyPW7NoZcZXLVpDsXunGDrk8= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.4 h1:yEvZ4neOQ/KpUqyR+X0ycUTW/kVRNR4nDZ38wStHGAA= -github.com/aws/aws-sdk-go-v2/service/sts v1.25.4/go.mod h1:feTnm2Tk/pJxdX+eooEsxvlvTWBvDm6CasRZ+JOs2IY= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.1 h1:K33V7L0XDdb23FMOZySr8bon1jou5SHn1fiv7NJ1SUg= +github.com/aws/aws-sdk-go-v2/service/sts v1.26.1/go.mod h1:YtXUl/sfnS06VksYhr855hTQf2HphfT1Xv/EwuzbPjg= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= -github.com/aws/smithy-go v1.17.0 h1:wWJD7LX6PBV6etBUwO0zElG0nWN9rUhp0WdYeHSHAaI= -github.com/aws/smithy-go v1.17.0/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= +github.com/aws/smithy-go v1.18.1 h1:pOdBTUfXNazOlxLrgeYalVnuTpKreACHtc62xLwIB3c= +github.com/aws/smithy-go v1.18.1/go.mod h1:NukqUGpCZIILqqiV0NIjeFh24kd/FAa4beRb6nbIUPE= github.com/basgys/goxml2json v1.1.0 h1:4ln5i4rseYfXNd86lGEB+Vi652IsIXIvggKM/BhUKVw= github.com/beefsack/go-rate v0.0.0-20220214233405-116f4ca011a0/go.mod h1:6YNgTHLutezwnBvyneBbwvB8C82y3dcoOj5EQJIdGXA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -590,7 +590,7 @@ github.com/frankban/quicktest v1.10.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P github.com/frankban/quicktest v1.11.0/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/frankban/quicktest v1.11.2/go.mod h1:K+q6oSqb0W0Ininfk863uOk1lMy69l/P6txr3mVT54s= github.com/frankban/quicktest v1.13.0/go.mod h1:qLE0fzW0VuyUAJgPU19zByoIr0HtCHN/r/VLSOOIySU= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= @@ -1430,8 +1430,8 @@ github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 h1:32k2QLgsKhcEs55q4REP github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3/go.mod h1:gJrXWi7wSGXfiC7+VheQaz+ypdCt5SmZNL+BRxUe7y4= github.com/signalfx/sapm-proto v0.13.0 h1:yEkp1+MAU4vZvnJMp56uhVlRjlvCK7KQjBg0g2Apw8k= github.com/signalfx/sapm-proto v0.13.0/go.mod h1:C72HjeCW5v0Llk6pIVJ/ZH8A5GbiZpCCSkE1dSlpWxY= -github.com/sijms/go-ora/v2 v2.7.22 h1:B2mSLhDDWTgsjdM0d/O7iJn041cBy5z7fA8sR082vCg= -github.com/sijms/go-ora/v2 v2.7.22/go.mod h1:EHxlY6x7y9HAsdfumurRfTd+v8NrEOTR3Xl4FWlH6xk= +github.com/sijms/go-ora/v2 v2.7.23 h1:a9/7sm4bOnIhwcxMcilRAADxabLh90tMiryfMVslcK8= +github.com/sijms/go-ora/v2 v2.7.23/go.mod h1:EHxlY6x7y9HAsdfumurRfTd+v8NrEOTR3Xl4FWlH6xk= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= @@ -1459,8 +1459,8 @@ github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= @@ -1502,8 +1502,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.803 h1:Kiv40x5ydJVRZfzN3vto8N6sfPhTkt9UL1PLhKmmoyQ= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.803/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.807 h1:L/frkQ4e34Q9WsVJn+666Mk3WmJQuAwBKOs5198c/So= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.807/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0= github.com/testcontainers/testcontainers-go v0.26.0 h1:uqcYdoOHBy1ca7gKODfBd9uTHVK3a7UL848z09MVZ0c= github.com/tg123/go-htpasswd v1.2.1 h1:i4wfsX1KvvkyoMiHZzjS0VzbAPWfxzI8INcZAKtutoU= github.com/tg123/go-htpasswd v1.2.1/go.mod h1:erHp1B86KXdwQf1X5ZrLb7erXZnWueEQezb2dql4q58= @@ -1547,7 +1547,7 @@ github.com/vishvananda/netlink v1.2.1-beta.2/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhg github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f h1:p4VB7kIXpOQvVn1ZaTIVp+3vuYAXFe3OJEvjbUYJLaA= github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= -github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= +github.com/vmihailenco/msgpack/v4 v4.3.13 h1:A2wsiTbvp63ilDaWmsk2wjx6xZdxQOvpiNlKBGKKXKI= github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= github.com/vmware/go-vmware-nsxt v0.0.0-20230223012718-d31b8a1ca05e h1:Vu41Q0Pv3yMdd+tcDW6QeEUIK2L+9ZrPrq8NAMrKSLc= github.com/vmware/go-vmware-nsxt v0.0.0-20230223012718-d31b8a1ca05e/go.mod h1:aRq5pxwgdJpAuP97SCjX1+Db32z/b0dggQ07FDF+fqE= diff --git a/internal/aws/awsutil/go.mod b/internal/aws/awsutil/go.mod index 3efb558e05b8..1b4e203603e3 100644 --- a/internal/aws/awsutil/go.mod +++ b/internal/aws/awsutil/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/aw go 1.20 require ( - github.com/aws/aws-sdk-go v1.48.5 + github.com/aws/aws-sdk-go v1.48.9 github.com/stretchr/testify v1.8.4 go.uber.org/zap v1.26.0 golang.org/x/net v0.18.0 diff --git a/internal/aws/awsutil/go.sum b/internal/aws/awsutil/go.sum index b1c3dd985399..0c6d332066f1 100644 --- a/internal/aws/awsutil/go.sum +++ b/internal/aws/awsutil/go.sum @@ -1,5 +1,5 @@ -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/internal/aws/cwlogs/go.mod b/internal/aws/cwlogs/go.mod index fff487ef4156..6519acf45269 100644 --- a/internal/aws/cwlogs/go.mod +++ b/internal/aws/cwlogs/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cw go 1.20 require ( - github.com/aws/aws-sdk-go v1.48.5 + github.com/aws/aws-sdk-go v1.48.9 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/component v0.90.0 go.uber.org/zap v1.26.0 diff --git a/internal/aws/cwlogs/go.sum b/internal/aws/cwlogs/go.sum index eddca82cc0c7..687516dd7e61 100644 --- a/internal/aws/cwlogs/go.sum +++ b/internal/aws/cwlogs/go.sum @@ -1,5 +1,5 @@ -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/internal/aws/k8s/go.mod b/internal/aws/k8s/go.mod index aa8b724c0d30..9afa84bc2d7d 100644 --- a/internal/aws/k8s/go.mod +++ b/internal/aws/k8s/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8 go 1.20 require ( - github.com/aws/aws-sdk-go v1.48.5 + github.com/aws/aws-sdk-go v1.48.9 github.com/stretchr/testify v1.8.4 go.uber.org/zap v1.26.0 k8s.io/api v0.28.4 diff --git a/internal/aws/k8s/go.sum b/internal/aws/k8s/go.sum index 6252bc9551f0..acd46110d295 100644 --- a/internal/aws/k8s/go.sum +++ b/internal/aws/k8s/go.sum @@ -1,5 +1,5 @@ -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= diff --git a/internal/aws/proxy/go.mod b/internal/aws/proxy/go.mod index 964a6ce4565a..b8e1546820fe 100644 --- a/internal/aws/proxy/go.mod +++ b/internal/aws/proxy/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/pr go 1.20 require ( - github.com/aws/aws-sdk-go v1.48.5 + github.com/aws/aws-sdk-go v1.48.9 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.90.0 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/config/confignet v0.90.0 diff --git a/internal/aws/proxy/go.sum b/internal/aws/proxy/go.sum index 1608bf0b401b..a50ab2e983f6 100644 --- a/internal/aws/proxy/go.sum +++ b/internal/aws/proxy/go.sum @@ -1,5 +1,5 @@ -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/internal/aws/xray/go.mod b/internal/aws/xray/go.mod index 3e67fc9d7bf9..101ddda9d632 100644 --- a/internal/aws/xray/go.mod +++ b/internal/aws/xray/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xr go 1.20 require ( - github.com/aws/aws-sdk-go v1.48.5 + github.com/aws/aws-sdk-go v1.48.9 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.90.0 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/component v0.90.0 diff --git a/internal/aws/xray/go.sum b/internal/aws/xray/go.sum index 09f82e6bf371..820a80604959 100644 --- a/internal/aws/xray/go.sum +++ b/internal/aws/xray/go.sum @@ -1,5 +1,5 @@ -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/internal/aws/xray/testdata/sampleapp/go.mod b/internal/aws/xray/testdata/sampleapp/go.mod index 48d094188f75..e8e85eda3ef5 100644 --- a/internal/aws/xray/testdata/sampleapp/go.mod +++ b/internal/aws/xray/testdata/sampleapp/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xr go 1.20 require ( - github.com/aws/aws-sdk-go v1.48.5 + github.com/aws/aws-sdk-go v1.48.9 github.com/aws/aws-xray-sdk-go v1.8.3 ) diff --git a/internal/aws/xray/testdata/sampleapp/go.sum b/internal/aws/xray/testdata/sampleapp/go.sum index 9d47f4525c66..904dd184b1bf 100644 --- a/internal/aws/xray/testdata/sampleapp/go.sum +++ b/internal/aws/xray/testdata/sampleapp/go.sum @@ -1,8 +1,8 @@ github.com/DATA-DOG/go-sqlmock v1.4.1 h1:ThlnYciV1iM/V0OSF/dtkqWb6xo5qITT1TJBG1MRDJM= github.com/andybalholm/brotli v1.0.6 h1:Yf9fFpf49Zrxb9NlQaluyE92/+X7UVHlhMNJN2sxfOI= github.com/andybalholm/brotli v1.0.6/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-xray-sdk-go v1.8.3 h1:S8GdgVncBRhzbNnNUgTPwhEqhwt2alES/9rLASyhxjU= github.com/aws/aws-xray-sdk-go v1.8.3/go.mod h1:tv8uLMOSCABolrIF8YCcp3ghyswArsan8dfLCA1ZATk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/internal/filter/filterottl/filter.go b/internal/filter/filterottl/filter.go index 4493ba0bd6ea..6324c8a35bd9 100644 --- a/internal/filter/filterottl/filter.go +++ b/internal/filter/filterottl/filter.go @@ -20,132 +20,94 @@ import ( // The passed in functions should use the ottlspan.TransformContext. // If a function named `match` is not present in the function map it will be added automatically so that parsing works as expected func NewBoolExprForSpan(conditions []string, functions map[string]ottl.Factory[ottlspan.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (expr.BoolExpr[ottlspan.TransformContext], error) { - match := newMatchFactory[ottlspan.TransformContext]() - if _, ok := functions[match.Name()]; !ok { - functions[match.Name()] = match - } - statmentsStr := conditionsToStatements(conditions) parser, err := ottlspan.NewParser(functions, set) if err != nil { return nil, err } - statements, err := parser.ParseStatements(statmentsStr) + statements, err := parser.ParseConditions(conditions) if err != nil { return nil, err } - s := ottlspan.NewStatements(statements, set, ottlspan.WithErrorMode(errorMode)) - return &s, nil + c := ottlspan.NewConditionSequence(statements, set, ottlspan.WithConditionSequenceErrorMode(errorMode)) + return &c, nil } // NewBoolExprForSpanEvent creates a BoolExpr[ottlspanevent.TransformContext] that will return true if any of the given OTTL conditions evaluate to true. // The passed in functions should use the ottlspanevent.TransformContext. // If a function named `match` is not present in the function map it will be added automatically so that parsing works as expected func NewBoolExprForSpanEvent(conditions []string, functions map[string]ottl.Factory[ottlspanevent.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (expr.BoolExpr[ottlspanevent.TransformContext], error) { - match := newMatchFactory[ottlspanevent.TransformContext]() - if _, ok := functions[match.Name()]; !ok { - functions[match.Name()] = match - } - statmentsStr := conditionsToStatements(conditions) parser, err := ottlspanevent.NewParser(functions, set) if err != nil { return nil, err } - statements, err := parser.ParseStatements(statmentsStr) + statements, err := parser.ParseConditions(conditions) if err != nil { return nil, err } - s := ottlspanevent.NewStatements(statements, set, ottlspanevent.WithErrorMode(errorMode)) - return &s, nil + c := ottlspanevent.NewConditionSequence(statements, set, ottlspanevent.WithConditionSequenceErrorMode(errorMode)) + return &c, nil } // NewBoolExprForMetric creates a BoolExpr[ottlmetric.TransformContext] that will return true if any of the given OTTL conditions evaluate to true. // The passed in functions should use the ottlmetric.TransformContext. // If a function named `match` is not present in the function map it will be added automatically so that parsing works as expected func NewBoolExprForMetric(conditions []string, functions map[string]ottl.Factory[ottlmetric.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (expr.BoolExpr[ottlmetric.TransformContext], error) { - match := newMatchFactory[ottlmetric.TransformContext]() - if _, ok := functions[match.Name()]; !ok { - functions[match.Name()] = match - } - statmentsStr := conditionsToStatements(conditions) parser, err := ottlmetric.NewParser(functions, set) if err != nil { return nil, err } - statements, err := parser.ParseStatements(statmentsStr) + statements, err := parser.ParseConditions(conditions) if err != nil { return nil, err } - s := ottlmetric.NewStatements(statements, set, ottlmetric.WithErrorMode(errorMode)) - return &s, nil + c := ottlmetric.NewConditionSequence(statements, set, ottlmetric.WithConditionSequenceErrorMode(errorMode)) + return &c, nil } // NewBoolExprForDataPoint creates a BoolExpr[ottldatapoint.TransformContext] that will return true if any of the given OTTL conditions evaluate to true. // The passed in functions should use the ottldatapoint.TransformContext. // If a function named `match` is not present in the function map it will be added automatically so that parsing works as expected func NewBoolExprForDataPoint(conditions []string, functions map[string]ottl.Factory[ottldatapoint.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (expr.BoolExpr[ottldatapoint.TransformContext], error) { - match := newMatchFactory[ottldatapoint.TransformContext]() - if _, ok := functions[match.Name()]; !ok { - functions[match.Name()] = match - } - statmentsStr := conditionsToStatements(conditions) parser, err := ottldatapoint.NewParser(functions, set) if err != nil { return nil, err } - statements, err := parser.ParseStatements(statmentsStr) + statements, err := parser.ParseConditions(conditions) if err != nil { return nil, err } - s := ottldatapoint.NewStatements(statements, set, ottldatapoint.WithErrorMode(errorMode)) - return &s, nil + c := ottldatapoint.NewConditionSequence(statements, set, ottldatapoint.WithConditionSequenceErrorMode(errorMode)) + return &c, nil } // NewBoolExprForLog creates a BoolExpr[ottllog.TransformContext] that will return true if any of the given OTTL conditions evaluate to true. // The passed in functions should use the ottllog.TransformContext. // If a function named `match` is not present in the function map it will be added automatically so that parsing works as expected func NewBoolExprForLog(conditions []string, functions map[string]ottl.Factory[ottllog.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (expr.BoolExpr[ottllog.TransformContext], error) { - match := newMatchFactory[ottllog.TransformContext]() - if _, ok := functions[match.Name()]; !ok { - functions[match.Name()] = match - } - statmentsStr := conditionsToStatements(conditions) parser, err := ottllog.NewParser(functions, set) if err != nil { return nil, err } - statements, err := parser.ParseStatements(statmentsStr) + statements, err := parser.ParseConditions(conditions) if err != nil { return nil, err } - s := ottllog.NewStatements(statements, set, ottllog.WithErrorMode(errorMode)) - return &s, nil + c := ottllog.NewConditionSequence(statements, set, ottllog.WithConditionSequenceErrorMode(errorMode)) + return &c, nil } // NewBoolExprForResource creates a BoolExpr[ottlresource.TransformContext] that will return true if any of the given OTTL conditions evaluate to true. // The passed in functions should use the ottlresource.TransformContext. // If a function named `match` is not present in the function map it will be added automatically so that parsing works as expected func NewBoolExprForResource(conditions []string, functions map[string]ottl.Factory[ottlresource.TransformContext], errorMode ottl.ErrorMode, set component.TelemetrySettings) (expr.BoolExpr[ottlresource.TransformContext], error) { - match := newMatchFactory[ottlresource.TransformContext]() - if _, ok := functions[match.Name()]; !ok { - functions[match.Name()] = match - } - statmentsStr := conditionsToStatements(conditions) parser, err := ottlresource.NewParser(functions, set) if err != nil { return nil, err } - statements, err := parser.ParseStatements(statmentsStr) + statements, err := parser.ParseConditions(conditions) if err != nil { return nil, err } - s := ottlresource.NewStatements(statements, set, ottlresource.WithErrorMode(errorMode)) - return &s, nil -} - -func conditionsToStatements(conditions []string) []string { - statements := make([]string, len(conditions)) - for i, condition := range conditions { - statements[i] = "match() where " + condition - } - return statements + c := ottlresource.NewConditionSequence(statements, set, ottlresource.WithConditionSequenceErrorMode(errorMode)) + return &c, nil } diff --git a/internal/filter/filterottl/functions.go b/internal/filter/filterottl/functions.go index 82c9c6b79997..355a148f6cb6 100644 --- a/internal/filter/filterottl/functions.go +++ b/internal/filter/filterottl/functions.go @@ -20,15 +20,15 @@ import ( ) func StandardSpanFuncs() map[string]ottl.Factory[ottlspan.TransformContext] { - return standardFuncs[ottlspan.TransformContext]() + return ottlfuncs.StandardConverters[ottlspan.TransformContext]() } func StandardSpanEventFuncs() map[string]ottl.Factory[ottlspanevent.TransformContext] { - return standardFuncs[ottlspanevent.TransformContext]() + return ottlfuncs.StandardConverters[ottlspanevent.TransformContext]() } func StandardMetricFuncs() map[string]ottl.Factory[ottlmetric.TransformContext] { - m := standardFuncs[ottlmetric.TransformContext]() + m := ottlfuncs.StandardConverters[ottlmetric.TransformContext]() hasAttributeOnDatapointFactory := newHasAttributeOnDatapointFactory() hasAttributeKeyOnDatapointFactory := newHasAttributeKeyOnDatapointFactory() m[hasAttributeOnDatapointFactory.Name()] = hasAttributeOnDatapointFactory @@ -37,36 +37,15 @@ func StandardMetricFuncs() map[string]ottl.Factory[ottlmetric.TransformContext] } func StandardDataPointFuncs() map[string]ottl.Factory[ottldatapoint.TransformContext] { - return standardFuncs[ottldatapoint.TransformContext]() + return ottlfuncs.StandardConverters[ottldatapoint.TransformContext]() } func StandardLogFuncs() map[string]ottl.Factory[ottllog.TransformContext] { - return standardFuncs[ottllog.TransformContext]() + return ottlfuncs.StandardConverters[ottllog.TransformContext]() } func StandardResourceFuncs() map[string]ottl.Factory[ottlresource.TransformContext] { - return standardFuncs[ottlresource.TransformContext]() -} - -func standardFuncs[K any]() map[string]ottl.Factory[K] { - m := ottlfuncs.StandardConverters[K]() - f := newMatchFactory[K]() - m[f.Name()] = f - return m -} - -func newMatchFactory[K any]() ottl.Factory[K] { - return ottl.NewFactory("match", nil, createMatchFunction[K]) -} - -func createMatchFunction[K any](_ ottl.FunctionContext, _ ottl.Arguments) (ottl.ExprFunc[K], error) { - return matchFn[K]() -} - -func matchFn[K any]() (ottl.ExprFunc[K], error) { - return func(context.Context, K) (any, error) { - return true, nil - }, nil + return ottlfuncs.StandardConverters[ottlresource.TransformContext]() } type hasAttributeOnDatapointArguments struct { diff --git a/internal/kafka/go.mod b/internal/kafka/go.mod index ce795a2e8c64..442de34ea366 100644 --- a/internal/kafka/go.mod +++ b/internal/kafka/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/IBM/sarama v1.42.1 - github.com/aws/aws-sdk-go v1.48.5 + github.com/aws/aws-sdk-go v1.48.9 github.com/stretchr/testify v1.8.4 github.com/xdg-go/scram v1.1.2 go.opentelemetry.io/collector/config/configtls v0.90.0 diff --git a/internal/kafka/go.sum b/internal/kafka/go.sum index 613394b5f400..b66f7ca81159 100644 --- a/internal/kafka/go.sum +++ b/internal/kafka/go.sum @@ -1,7 +1,7 @@ github.com/IBM/sarama v1.42.1 h1:wugyWa15TDEHh2kvq2gAy1IHLjEjuYOYgXz/ruC/OSQ= github.com/IBM/sarama v1.42.1/go.mod h1:Xxho9HkHd4K/MDUo/T/sOqwtX/17D33++E9Wib6hUdQ= -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= diff --git a/internal/metadataproviders/go.mod b/internal/metadataproviders/go.mod index 8cb3cca247b3..285290c9d31b 100644 --- a/internal/metadataproviders/go.mod +++ b/internal/metadataproviders/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/Showmax/go-fqdn v1.0.0 - github.com/aws/aws-sdk-go v1.48.5 + github.com/aws/aws-sdk-go v1.48.9 github.com/docker/docker v24.0.7+incompatible github.com/hashicorp/consul/api v1.26.1 github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.90.0 diff --git a/internal/metadataproviders/go.sum b/internal/metadataproviders/go.sum index a283243e16b3..3e3027a2af52 100644 --- a/internal/metadataproviders/go.sum +++ b/internal/metadataproviders/go.sum @@ -51,8 +51,8 @@ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= diff --git a/internal/metadataproviders/system/metadata.go b/internal/metadataproviders/system/metadata.go index 284b85b32255..e97b79b2092a 100644 --- a/internal/metadataproviders/system/metadata.go +++ b/internal/metadataproviders/system/metadata.go @@ -63,6 +63,9 @@ type Provider interface { // HostArch returns the host architecture HostArch() (string, error) + + // HostIPs returns the host's IP interfaces + HostIPs() ([]net.IP, error) } type systemMetadataProvider struct { @@ -159,3 +162,37 @@ func (p systemMetadataProvider) OSDescription(ctx context.Context) (string, erro func (systemMetadataProvider) HostArch() (string, error) { return internal.GOARCHtoHostArch(runtime.GOARCH), nil } + +func (p systemMetadataProvider) HostIPs() (ips []net.IP, err error) { + ifaces, err := net.Interfaces() + if err != nil { + return nil, err + } + + for _, iface := range ifaces { + // skip if the interface is down or is a loopback interface + if iface.Flags&net.FlagUp == 0 || iface.Flags&net.FlagLoopback != 0 { + continue + } + + addrs, errAddr := iface.Addrs() + if errAddr != nil { + return nil, fmt.Errorf("failed to get addresses for interface %v: %w", iface, errAddr) + } + for _, addr := range addrs { + ip, _, parseErr := net.ParseCIDR(addr.String()) + if parseErr != nil { + return nil, fmt.Errorf("failed to parse address %q from interface %v: %w", addr, iface, parseErr) + } + + if ip.IsLoopback() { + // skip loopback IPs + continue + } + + ips = append(ips, ip) + } + + } + return ips, err +} diff --git a/pkg/ottl/config.go b/pkg/ottl/config.go new file mode 100644 index 000000000000..eed0724b9909 --- /dev/null +++ b/pkg/ottl/config.go @@ -0,0 +1,45 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package ottl // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" + +import ( + "fmt" + "strings" +) + +type ErrorMode string + +const ( + IgnoreError ErrorMode = "ignore" + PropagateError ErrorMode = "propagate" +) + +func (e *ErrorMode) UnmarshalText(text []byte) error { + str := ErrorMode(strings.ToLower(string(text))) + switch str { + case IgnoreError, PropagateError: + *e = str + return nil + default: + return fmt.Errorf("unknown error mode %v", str) + } +} + +type LogicOperation string + +const ( + And LogicOperation = "and" + Or LogicOperation = "or" +) + +func (l *LogicOperation) UnmarshalText(text []byte) error { + str := LogicOperation(strings.ToLower(string(text))) + switch str { + case And, Or: + *l = str + return nil + default: + return fmt.Errorf("unknown LogicOperation %v", str) + } +} diff --git a/pkg/ottl/contexts/ottldatapoint/datapoint.go b/pkg/ottl/contexts/ottldatapoint/datapoint.go index 3d2ac0e22a2f..d2f432a2bb20 100644 --- a/pkg/ottl/contexts/ottldatapoint/datapoint.go +++ b/pkg/ottl/contexts/ottldatapoint/datapoint.go @@ -82,22 +82,38 @@ func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySet return p, nil } -type StatementsOption func(*ottl.Statements[TransformContext]) +type StatementSequenceOption func(*ottl.StatementSequence[TransformContext]) -func WithErrorMode(errorMode ottl.ErrorMode) StatementsOption { - return func(s *ottl.Statements[TransformContext]) { - ottl.WithErrorMode[TransformContext](errorMode)(s) +func WithStatementSequenceErrorMode(errorMode ottl.ErrorMode) StatementSequenceOption { + return func(s *ottl.StatementSequence[TransformContext]) { + ottl.WithStatementSequenceErrorMode[TransformContext](errorMode)(s) } } -func NewStatements(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementsOption) ottl.Statements[TransformContext] { - s := ottl.NewStatements(statements, telemetrySettings) +func NewStatementSequence(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementSequenceOption) ottl.StatementSequence[TransformContext] { + s := ottl.NewStatementSequence(statements, telemetrySettings) for _, op := range options { op(&s) } return s } +type ConditionSequenceOption func(*ottl.ConditionSequence[TransformContext]) + +func WithConditionSequenceErrorMode(errorMode ottl.ErrorMode) ConditionSequenceOption { + return func(c *ottl.ConditionSequence[TransformContext]) { + ottl.WithConditionSequenceErrorMode[TransformContext](errorMode)(c) + } +} + +func NewConditionSequence(conditions []*ottl.Condition[TransformContext], telemetrySettings component.TelemetrySettings, options ...ConditionSequenceOption) ottl.ConditionSequence[TransformContext] { + c := ottl.NewConditionSequence(conditions, telemetrySettings) + for _, op := range options { + op(&c) + } + return c +} + var symbolTable = map[ottl.EnumSymbol]ottl.Enum{ "FLAG_NONE": 0, "FLAG_NO_RECORDED_VALUE": 1, diff --git a/pkg/ottl/contexts/ottllog/log.go b/pkg/ottl/contexts/ottllog/log.go index c9fe394bc4c5..bc7954ea6614 100644 --- a/pkg/ottl/contexts/ottllog/log.go +++ b/pkg/ottl/contexts/ottllog/log.go @@ -72,22 +72,38 @@ func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySet return p, nil } -type StatementsOption func(*ottl.Statements[TransformContext]) +type StatementSequenceOption func(*ottl.StatementSequence[TransformContext]) -func WithErrorMode(errorMode ottl.ErrorMode) StatementsOption { - return func(s *ottl.Statements[TransformContext]) { - ottl.WithErrorMode[TransformContext](errorMode)(s) +func WithStatementSequenceErrorMode(errorMode ottl.ErrorMode) StatementSequenceOption { + return func(s *ottl.StatementSequence[TransformContext]) { + ottl.WithStatementSequenceErrorMode[TransformContext](errorMode)(s) } } -func NewStatements(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementsOption) ottl.Statements[TransformContext] { - s := ottl.NewStatements(statements, telemetrySettings) +func NewStatementSequence(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementSequenceOption) ottl.StatementSequence[TransformContext] { + s := ottl.NewStatementSequence(statements, telemetrySettings) for _, op := range options { op(&s) } return s } +type ConditionSequenceOption func(*ottl.ConditionSequence[TransformContext]) + +func WithConditionSequenceErrorMode(errorMode ottl.ErrorMode) ConditionSequenceOption { + return func(c *ottl.ConditionSequence[TransformContext]) { + ottl.WithConditionSequenceErrorMode[TransformContext](errorMode)(c) + } +} + +func NewConditionSequence(conditions []*ottl.Condition[TransformContext], telemetrySettings component.TelemetrySettings, options ...ConditionSequenceOption) ottl.ConditionSequence[TransformContext] { + c := ottl.NewConditionSequence(conditions, telemetrySettings) + for _, op := range options { + op(&c) + } + return c +} + var symbolTable = map[ottl.EnumSymbol]ottl.Enum{ "SEVERITY_NUMBER_UNSPECIFIED": ottl.Enum(plog.SeverityNumberUnspecified), "SEVERITY_NUMBER_TRACE": ottl.Enum(plog.SeverityNumberTrace), diff --git a/pkg/ottl/contexts/ottlmetric/metrics.go b/pkg/ottl/contexts/ottlmetric/metrics.go index 92267ecadc7d..db3cbb625107 100644 --- a/pkg/ottl/contexts/ottlmetric/metrics.go +++ b/pkg/ottl/contexts/ottlmetric/metrics.go @@ -76,22 +76,38 @@ func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySet return p, err } -type StatementsOption func(*ottl.Statements[TransformContext]) +type StatementSequenceOption func(*ottl.StatementSequence[TransformContext]) -func WithErrorMode(errorMode ottl.ErrorMode) StatementsOption { - return func(s *ottl.Statements[TransformContext]) { - ottl.WithErrorMode[TransformContext](errorMode)(s) +func WithStatementSequenceErrorMode(errorMode ottl.ErrorMode) StatementSequenceOption { + return func(s *ottl.StatementSequence[TransformContext]) { + ottl.WithStatementSequenceErrorMode[TransformContext](errorMode)(s) } } -func NewStatements(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementsOption) ottl.Statements[TransformContext] { - s := ottl.NewStatements(statements, telemetrySettings) +func NewStatementSequence(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementSequenceOption) ottl.StatementSequence[TransformContext] { + s := ottl.NewStatementSequence(statements, telemetrySettings) for _, op := range options { op(&s) } return s } +type ConditionSequenceOption func(*ottl.ConditionSequence[TransformContext]) + +func WithConditionSequenceErrorMode(errorMode ottl.ErrorMode) ConditionSequenceOption { + return func(c *ottl.ConditionSequence[TransformContext]) { + ottl.WithConditionSequenceErrorMode[TransformContext](errorMode)(c) + } +} + +func NewConditionSequence(conditions []*ottl.Condition[TransformContext], telemetrySettings component.TelemetrySettings, options ...ConditionSequenceOption) ottl.ConditionSequence[TransformContext] { + c := ottl.NewConditionSequence(conditions, telemetrySettings) + for _, op := range options { + op(&c) + } + return c +} + var symbolTable = internal.MetricSymbolTable func parseEnum(val *ottl.EnumSymbol) (*ottl.Enum, error) { diff --git a/pkg/ottl/contexts/ottlresource/resource.go b/pkg/ottl/contexts/ottlresource/resource.go index 921d00311342..552c192e8b56 100644 --- a/pkg/ottl/contexts/ottlresource/resource.go +++ b/pkg/ottl/contexts/ottlresource/resource.go @@ -55,22 +55,38 @@ func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySet return p, nil } -type StatementsOption func(*ottl.Statements[TransformContext]) +type StatementSequenceOption func(*ottl.StatementSequence[TransformContext]) -func WithErrorMode(errorMode ottl.ErrorMode) StatementsOption { - return func(s *ottl.Statements[TransformContext]) { - ottl.WithErrorMode[TransformContext](errorMode)(s) +func WithStatementSequenceErrorMode(errorMode ottl.ErrorMode) StatementSequenceOption { + return func(s *ottl.StatementSequence[TransformContext]) { + ottl.WithStatementSequenceErrorMode[TransformContext](errorMode)(s) } } -func NewStatements(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementsOption) ottl.Statements[TransformContext] { - s := ottl.NewStatements(statements, telemetrySettings) +func NewStatementSequence(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementSequenceOption) ottl.StatementSequence[TransformContext] { + s := ottl.NewStatementSequence(statements, telemetrySettings) for _, op := range options { op(&s) } return s } +type ConditionSequenceOption func(*ottl.ConditionSequence[TransformContext]) + +func WithConditionSequenceErrorMode(errorMode ottl.ErrorMode) ConditionSequenceOption { + return func(c *ottl.ConditionSequence[TransformContext]) { + ottl.WithConditionSequenceErrorMode[TransformContext](errorMode)(c) + } +} + +func NewConditionSequence(conditions []*ottl.Condition[TransformContext], telemetrySettings component.TelemetrySettings, options ...ConditionSequenceOption) ottl.ConditionSequence[TransformContext] { + c := ottl.NewConditionSequence(conditions, telemetrySettings) + for _, op := range options { + op(&c) + } + return c +} + func parseEnum(_ *ottl.EnumSymbol) (*ottl.Enum, error) { return nil, fmt.Errorf("resource context does not provide Enum support") } diff --git a/pkg/ottl/contexts/ottlscope/scope.go b/pkg/ottl/contexts/ottlscope/scope.go index 9c8ce9406c81..1ac78993a646 100644 --- a/pkg/ottl/contexts/ottlscope/scope.go +++ b/pkg/ottl/contexts/ottlscope/scope.go @@ -62,22 +62,38 @@ func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySet return p, nil } -type StatementsOption func(*ottl.Statements[TransformContext]) +type StatementSequenceOption func(*ottl.StatementSequence[TransformContext]) -func WithErrorMode(errorMode ottl.ErrorMode) StatementsOption { - return func(s *ottl.Statements[TransformContext]) { - ottl.WithErrorMode[TransformContext](errorMode)(s) +func WithStatementSequenceErrorMode(errorMode ottl.ErrorMode) StatementSequenceOption { + return func(s *ottl.StatementSequence[TransformContext]) { + ottl.WithStatementSequenceErrorMode[TransformContext](errorMode)(s) } } -func NewStatements(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementsOption) ottl.Statements[TransformContext] { - s := ottl.NewStatements(statements, telemetrySettings) +func NewStatementSequence(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementSequenceOption) ottl.StatementSequence[TransformContext] { + s := ottl.NewStatementSequence(statements, telemetrySettings) for _, op := range options { op(&s) } return s } +type ConditionSequenceOption func(*ottl.ConditionSequence[TransformContext]) + +func WithConditionSequenceErrorMode(errorMode ottl.ErrorMode) ConditionSequenceOption { + return func(c *ottl.ConditionSequence[TransformContext]) { + ottl.WithConditionSequenceErrorMode[TransformContext](errorMode)(c) + } +} + +func NewConditionSequence(conditions []*ottl.Condition[TransformContext], telemetrySettings component.TelemetrySettings, options ...ConditionSequenceOption) ottl.ConditionSequence[TransformContext] { + c := ottl.NewConditionSequence(conditions, telemetrySettings) + for _, op := range options { + op(&c) + } + return c +} + func parseEnum(_ *ottl.EnumSymbol) (*ottl.Enum, error) { return nil, fmt.Errorf("instrumentation scope context does not provide Enum support") } diff --git a/pkg/ottl/contexts/ottlspan/span.go b/pkg/ottl/contexts/ottlspan/span.go index 34f3d2bcf599..df2f2ddc2623 100644 --- a/pkg/ottl/contexts/ottlspan/span.go +++ b/pkg/ottl/contexts/ottlspan/span.go @@ -69,22 +69,38 @@ func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySet return p, nil } -type StatementsOption func(*ottl.Statements[TransformContext]) +type StatementSequenceOption func(*ottl.StatementSequence[TransformContext]) -func WithErrorMode(errorMode ottl.ErrorMode) StatementsOption { - return func(s *ottl.Statements[TransformContext]) { - ottl.WithErrorMode[TransformContext](errorMode)(s) +func WithStatementSequenceErrorMode(errorMode ottl.ErrorMode) StatementSequenceOption { + return func(s *ottl.StatementSequence[TransformContext]) { + ottl.WithStatementSequenceErrorMode[TransformContext](errorMode)(s) } } -func NewStatements(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementsOption) ottl.Statements[TransformContext] { - s := ottl.NewStatements(statements, telemetrySettings) +func NewStatementSequence(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementSequenceOption) ottl.StatementSequence[TransformContext] { + s := ottl.NewStatementSequence(statements, telemetrySettings) for _, op := range options { op(&s) } return s } +type ConditionSequenceOption func(*ottl.ConditionSequence[TransformContext]) + +func WithConditionSequenceErrorMode(errorMode ottl.ErrorMode) ConditionSequenceOption { + return func(c *ottl.ConditionSequence[TransformContext]) { + ottl.WithConditionSequenceErrorMode[TransformContext](errorMode)(c) + } +} + +func NewConditionSequence(conditions []*ottl.Condition[TransformContext], telemetrySettings component.TelemetrySettings, options ...ConditionSequenceOption) ottl.ConditionSequence[TransformContext] { + c := ottl.NewConditionSequence(conditions, telemetrySettings) + for _, op := range options { + op(&c) + } + return c +} + func parseEnum(val *ottl.EnumSymbol) (*ottl.Enum, error) { if val != nil { if enum, ok := internal.SpanSymbolTable[*val]; ok { diff --git a/pkg/ottl/contexts/ottlspanevent/span_events.go b/pkg/ottl/contexts/ottlspanevent/span_events.go index 70014a486560..8748ef2467c8 100644 --- a/pkg/ottl/contexts/ottlspanevent/span_events.go +++ b/pkg/ottl/contexts/ottlspanevent/span_events.go @@ -77,22 +77,38 @@ func NewParser(functions map[string]ottl.Factory[TransformContext], telemetrySet return p, nil } -type StatementsOption func(*ottl.Statements[TransformContext]) +type StatementSequenceOption func(*ottl.StatementSequence[TransformContext]) -func WithErrorMode(errorMode ottl.ErrorMode) StatementsOption { - return func(s *ottl.Statements[TransformContext]) { - ottl.WithErrorMode[TransformContext](errorMode)(s) +func WithStatementSequenceErrorMode(errorMode ottl.ErrorMode) StatementSequenceOption { + return func(s *ottl.StatementSequence[TransformContext]) { + ottl.WithStatementSequenceErrorMode[TransformContext](errorMode)(s) } } -func NewStatements(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementsOption) ottl.Statements[TransformContext] { - s := ottl.NewStatements(statements, telemetrySettings) +func NewStatementSequence(statements []*ottl.Statement[TransformContext], telemetrySettings component.TelemetrySettings, options ...StatementSequenceOption) ottl.StatementSequence[TransformContext] { + s := ottl.NewStatementSequence(statements, telemetrySettings) for _, op := range options { op(&s) } return s } +type ConditionSequenceOption func(*ottl.ConditionSequence[TransformContext]) + +func WithConditionSequenceErrorMode(errorMode ottl.ErrorMode) ConditionSequenceOption { + return func(c *ottl.ConditionSequence[TransformContext]) { + ottl.WithConditionSequenceErrorMode[TransformContext](errorMode)(c) + } +} + +func NewConditionSequence(conditions []*ottl.Condition[TransformContext], telemetrySettings component.TelemetrySettings, options ...ConditionSequenceOption) ottl.ConditionSequence[TransformContext] { + c := ottl.NewConditionSequence(conditions, telemetrySettings) + for _, op := range options { + op(&c) + } + return c +} + func parseEnum(val *ottl.EnumSymbol) (*ottl.Enum, error) { if val != nil { if enum, ok := internal.SpanSymbolTable[*val]; ok { diff --git a/pkg/ottl/parser.go b/pkg/ottl/parser.go index f1dbc18f3f4c..222b3bbfa5e3 100644 --- a/pkg/ottl/parser.go +++ b/pkg/ottl/parser.go @@ -7,31 +7,12 @@ import ( "context" "errors" "fmt" - "strings" "github.com/alecthomas/participle/v2" "go.opentelemetry.io/collector/component" "go.uber.org/zap" ) -type ErrorMode string - -const ( - IgnoreError ErrorMode = "ignore" - PropagateError ErrorMode = "propagate" -) - -func (e *ErrorMode) UnmarshalText(text []byte) error { - str := ErrorMode(strings.ToLower(string(text))) - switch str { - case IgnoreError, PropagateError: - *e = str - return nil - default: - return fmt.Errorf("unknown error mode %v", str) - } -} - // Statement holds a top level Statement for processing telemetry data. A Statement is a combination of a function // invocation and the boolean expression to match telemetry for invoking the function. type Statement[K any] struct { @@ -70,7 +51,7 @@ func (c *Condition[K]) Eval(ctx context.Context, tCtx K) (bool, error) { return c.condition.Eval(ctx, tCtx) } -// Parser provides the means to parse OTTL Statements and Conditions given a specific set of functions, +// Parser provides the means to parse OTTL StatementSequence and Conditions given a specific set of functions, // a PathExpressionParser, and an EnumParser. type Parser[K any] struct { functions map[string]Factory[K] @@ -244,24 +225,30 @@ func newParser[G any]() *participle.Parser[G] { return parser } -// Statements represents a list of statements that will be executed sequentially for a TransformContext. -type Statements[K any] struct { +// StatementSequence represents a list of statements that will be executed sequentially for a TransformContext +// and will handle errors based on an ErrorMode. +type StatementSequence[K any] struct { statements []*Statement[K] errorMode ErrorMode telemetrySettings component.TelemetrySettings } -type StatementsOption[K any] func(*Statements[K]) +type StatementSequenceOption[K any] func(*StatementSequence[K]) -func WithErrorMode[K any](errorMode ErrorMode) StatementsOption[K] { - return func(s *Statements[K]) { +// WithStatementSequenceErrorMode sets the ErrorMode of a StatementSequence +func WithStatementSequenceErrorMode[K any](errorMode ErrorMode) StatementSequenceOption[K] { + return func(s *StatementSequence[K]) { s.errorMode = errorMode } } -func NewStatements[K any](statements []*Statement[K], telemetrySettings component.TelemetrySettings, options ...StatementsOption[K]) Statements[K] { - s := Statements[K]{ +// NewStatementSequence creates a new StatementSequence with the provided Statement slice and component.TelemetrySettings. +// The default ErrorMode is `Propagate`. +// You may also augment the StatementSequence with a slice of StatementSequenceOption. +func NewStatementSequence[K any](statements []*Statement[K], telemetrySettings component.TelemetrySettings, options ...StatementSequenceOption[K]) StatementSequence[K] { + s := StatementSequence[K]{ statements: statements, + errorMode: PropagateError, telemetrySettings: telemetrySettings, } for _, op := range options { @@ -270,8 +257,10 @@ func NewStatements[K any](statements []*Statement[K], telemetrySettings componen return s } -// Execute is a function that will execute all the statements in the Statements list. -func (s *Statements[K]) Execute(ctx context.Context, tCtx K) error { +// Execute is a function that will execute all the statements in the StatementSequence list. +// When the ErrorMode of the StatementSequence is `propagate`, errors cause the execution to halt and the error is returned. +// When the ErrorMode of the StatementSequence is `ignore`, errors are logged and execution continues to the next statement. +func (s *StatementSequence[K]) Execute(ctx context.Context, tCtx K) error { for _, statement := range s.statements { _, _, err := statement.Execute(ctx, tCtx) if err != nil { @@ -285,24 +274,83 @@ func (s *Statements[K]) Execute(ctx context.Context, tCtx K) error { return nil } -// Eval returns true if any statement's condition is true and returns false otherwise. -// Does not execute the statement's function. -// When errorMode is `propagate`, errors cause the evaluation to be false and an error is returned. -// When errorMode is `ignore`, errors cause evaluation to continue to the next statement. -func (s *Statements[K]) Eval(ctx context.Context, tCtx K) (bool, error) { - for _, statement := range s.statements { - match, err := statement.condition.Eval(ctx, tCtx) +// ConditionSequence represents a list of Conditions that will be evaluated sequentially for a TransformContext +// and will handle errors returned by conditions based on an ErrorMode. +// By default, the conditions are ORed together, but they can be ANDed together using the WithLogicOperation option. +type ConditionSequence[K any] struct { + conditions []*Condition[K] + errorMode ErrorMode + telemetrySettings component.TelemetrySettings + logicOp LogicOperation +} + +type ConditionSequenceOption[K any] func(*ConditionSequence[K]) + +// WithConditionSequenceErrorMode sets the ErrorMode of a ConditionSequence +func WithConditionSequenceErrorMode[K any](errorMode ErrorMode) ConditionSequenceOption[K] { + return func(c *ConditionSequence[K]) { + c.errorMode = errorMode + } +} + +// WithLogicOperation sets the LogicOperation of a ConditionSequence +// When setting AND the conditions will be ANDed together. +// When setting OR the conditions will be ORed together. +func WithLogicOperation[K any](logicOp LogicOperation) ConditionSequenceOption[K] { + return func(c *ConditionSequence[K]) { + c.logicOp = logicOp + } +} + +// NewConditionSequence creates a new ConditionSequence with the provided Condition slice and component.TelemetrySettings. +// The default ErrorMode is `Propagate` and the default LogicOperation is `OR`. +// You may also augment the ConditionSequence with a slice of ConditionSequenceOption. +func NewConditionSequence[K any](conditions []*Condition[K], telemetrySettings component.TelemetrySettings, options ...ConditionSequenceOption[K]) ConditionSequence[K] { + c := ConditionSequence[K]{ + conditions: conditions, + errorMode: PropagateError, + telemetrySettings: telemetrySettings, + logicOp: Or, + } + for _, op := range options { + op(&c) + } + return c +} + +// Eval evaluates the result of each Condition in the ConditionSequence. +// The boolean logic between conditions is based on the ConditionSequence's Logic Operator. +// If using the default OR LogicOperation, if any Condition evaluates to true, then true is returned and if all Conditions evaluate to false, then false is returned. +// If using the AND LogicOperation, if any Condition evaluates to false, then false is returned and if all Conditions evaluate to true, then true is returned. +// When the ErrorMode of the ConditionSequence is `propagate`, errors cause the evaluation to be false and an error is returned. +// When the ErrorMode of the ConditionSequence is `ignore`, errors cause the evaluation to continue to the next condition. +// When using the AND LogicOperation with the `ignore` ErrorMode the sequence will evaluate to false if all conditions error. +func (c *ConditionSequence[K]) Eval(ctx context.Context, tCtx K) (bool, error) { + var atLeastOneMatch bool + for _, condition := range c.conditions { + match, err := condition.Eval(ctx, tCtx) if err != nil { - if s.errorMode == PropagateError { - err = fmt.Errorf("failed to eval statement: %v, %w", statement.origText, err) + if c.errorMode == PropagateError { + err = fmt.Errorf("failed to eval condition: %v, %w", condition.origText, err) return false, err } - s.telemetrySettings.Logger.Warn("failed to eval statement", zap.Error(err), zap.String("statement", statement.origText)) + c.telemetrySettings.Logger.Warn("failed to eval condition", zap.Error(err), zap.String("condition", condition.origText)) continue } if match { - return true, nil + if c.logicOp == Or { + return true, nil + } + atLeastOneMatch = true + } + if !match && c.logicOp == And { + return false, nil } } - return false, nil + // When ANDing it is possible to arrive here not because everything was true, but because everything errored and was ignored. + // In that situation, we don't want to return True when no conditions actually passed. In a situation when everything failed + // we are essentially left with an empty set, which is normally evaluated in mathematics as False. We will use that + // idea to return False when ANDing and everything errored. We use atLeastOneMatch here to return true if anything did match. + // It is not possible to get here if any condition during an AND explicitly failed. + return c.logicOp == And && atLeastOneMatch, nil } diff --git a/pkg/ottl/parser_test.go b/pkg/ottl/parser_test.go index b5365ca6a2f4..834c5c1ca144 100644 --- a/pkg/ottl/parser_test.go +++ b/pkg/ottl/parser_test.go @@ -2094,7 +2094,7 @@ func Test_Statements_Execute_Error(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - statements := Statements[any]{ + statements := StatementSequence[any]{ statements: []*Statement[any]{ { condition: BoolExpr[any]{tt.condition}, @@ -2115,82 +2115,146 @@ func Test_Statements_Execute_Error(t *testing.T) { } } -func Test_Statements_Eval(t *testing.T) { +func Test_ConditionSequence_Eval(t *testing.T) { tests := []struct { name string conditions []boolExpressionEvaluator[any] function ExprFunc[any] errorMode ErrorMode + logicOp LogicOperation expectedResult bool }{ { - name: "True", + name: "True with OR", conditions: []boolExpressionEvaluator[any]{ alwaysTrue[any], }, errorMode: IgnoreError, + logicOp: Or, expectedResult: true, }, { - name: "At least one True", + name: "At least one True with OR", conditions: []boolExpressionEvaluator[any]{ alwaysFalse[any], alwaysFalse[any], alwaysTrue[any], }, errorMode: IgnoreError, + logicOp: Or, expectedResult: true, }, { - name: "False", + name: "False with OR", conditions: []boolExpressionEvaluator[any]{ alwaysFalse[any], alwaysFalse[any], }, errorMode: IgnoreError, + logicOp: Or, expectedResult: false, }, { - name: "Error is false when using Ignore", + name: "Single erroring condition is treated as false when using Ignore with OR", + conditions: []boolExpressionEvaluator[any]{ + func(context.Context, any) (bool, error) { + return true, fmt.Errorf("test") + }, + }, + errorMode: IgnoreError, + logicOp: Or, + expectedResult: false, + }, + { + name: "erroring condition is ignored when using Ignore with OR", + conditions: []boolExpressionEvaluator[any]{ + func(context.Context, any) (bool, error) { + return true, fmt.Errorf("test") + }, + alwaysTrue[any], + }, + errorMode: IgnoreError, + logicOp: Or, + expectedResult: true, + }, + { + name: "True with AND", + conditions: []boolExpressionEvaluator[any]{ + alwaysTrue[any], + alwaysTrue[any], + }, + errorMode: IgnoreError, + logicOp: And, + expectedResult: true, + }, + { + name: "At least one False with AND", conditions: []boolExpressionEvaluator[any]{ alwaysFalse[any], + alwaysTrue[any], + alwaysTrue[any], + }, + errorMode: IgnoreError, + logicOp: And, + expectedResult: false, + }, + { + name: "False with AND", + conditions: []boolExpressionEvaluator[any]{ + alwaysFalse[any], + }, + errorMode: IgnoreError, + logicOp: And, + expectedResult: false, + }, + { + name: "Single erroring condition is treated as false when using Ignore with AND", + conditions: []boolExpressionEvaluator[any]{ + func(context.Context, any) (bool, error) { + return true, fmt.Errorf("test") + }, + }, + errorMode: IgnoreError, + logicOp: And, + expectedResult: false, + }, + { + name: "erroring condition is ignored when using Ignore with AND", + conditions: []boolExpressionEvaluator[any]{ func(context.Context, any) (bool, error) { return true, fmt.Errorf("test") }, alwaysTrue[any], }, errorMode: IgnoreError, + logicOp: And, expectedResult: true, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - var rawStatements []*Statement[any] + var rawStatements []*Condition[any] for _, condition := range tt.conditions { - rawStatements = append(rawStatements, &Statement[any]{ + rawStatements = append(rawStatements, &Condition[any]{ condition: BoolExpr[any]{condition}, - function: Expr[any]{ - exprFunc: func(ctx context.Context, tCtx any) (any, error) { - return nil, fmt.Errorf("function should not be called") - }, - }, }) } - statements := Statements[any]{ - statements: rawStatements, + conditions := ConditionSequence[any]{ + conditions: rawStatements, telemetrySettings: componenttest.NewNopTelemetrySettings(), errorMode: tt.errorMode, + logicOp: tt.logicOp, } - result, err := statements.Eval(context.Background(), nil) + result, err := conditions.Eval(context.Background(), nil) assert.NoError(t, err) assert.Equal(t, tt.expectedResult, result) }) } } -func Test_Statements_Eval_Error(t *testing.T) { +func Test_ConditionSequence_Eval_Error(t *testing.T) { tests := []struct { name string conditions []boolExpressionEvaluator[any] @@ -2209,25 +2273,20 @@ func Test_Statements_Eval_Error(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - var rawStatements []*Statement[any] + var rawConditions []*Condition[any] for _, condition := range tt.conditions { - rawStatements = append(rawStatements, &Statement[any]{ + rawConditions = append(rawConditions, &Condition[any]{ condition: BoolExpr[any]{condition}, - function: Expr[any]{ - exprFunc: func(ctx context.Context, tCtx any) (any, error) { - return nil, fmt.Errorf("function should not be called") - }, - }, }) } - statements := Statements[any]{ - statements: rawStatements, + conditions := ConditionSequence[any]{ + conditions: rawConditions, telemetrySettings: componenttest.NewNopTelemetrySettings(), errorMode: tt.errorMode, } - result, err := statements.Eval(context.Background(), nil) + result, err := conditions.Eval(context.Background(), nil) assert.Error(t, err) assert.False(t, result) }) diff --git a/pkg/stanza/fileconsumer/file_test.go b/pkg/stanza/fileconsumer/file_test.go index cbd0c1cd797c..7e5dee5b6194 100644 --- a/pkg/stanza/fileconsumer/file_test.go +++ b/pkg/stanza/fileconsumer/file_test.go @@ -1494,10 +1494,8 @@ func TestReadExistingLogsWithHeader(t *testing.T) { } func TestDeleteAfterRead_SkipPartials(t *testing.T) { - bytesPerLine := 100 - shortFileLine := tokenWithLength(bytesPerLine - 1) + shortFileLine := "short file line" longFileLines := 100000 - longFileFirstLine := "first line of long file\n" require.NoError(t, featuregate.GlobalRegistry().Set(allowFileDeletion.ID(), true)) defer func() { @@ -1513,15 +1511,13 @@ func TestDeleteAfterRead_SkipPartials(t *testing.T) { operator.persister = testutil.NewUnscopedMockPersister() shortFile := openTemp(t, tempDir) - _, err := shortFile.WriteString(string(shortFileLine) + "\n") + _, err := shortFile.WriteString(shortFileLine + "\n") require.NoError(t, err) require.NoError(t, shortFile.Close()) longFile := openTemp(t, tempDir) - _, err = longFile.WriteString(longFileFirstLine) - require.NoError(t, err) for line := 0; line < longFileLines; line++ { - _, err := longFile.WriteString(string(tokenWithLength(bytesPerLine-1)) + "\n") + _, err := longFile.WriteString(string(tokenWithLength(100)) + "\n") require.NoError(t, err) } require.NoError(t, longFile.Close()) @@ -1541,22 +1537,26 @@ func TestDeleteAfterRead_SkipPartials(t *testing.T) { operator.poll(ctx) }() - for !(shortOne && longOne) { - if line := waitForEmit(t, emitCalls); string(line.token) == string(shortFileLine) { + for !shortOne || !longOne { + if line := waitForEmit(t, emitCalls); string(line.token) == shortFileLine { shortOne = true } else { longOne = true } } + // Short file was fully consumed and should eventually be deleted. + // Enforce assertion before canceling because EOF is not necessarily detected + // immediately when the token is emitted. An additional scan may be necessary. + require.EventuallyWithT(t, func(c *assert.CollectT) { + assert.NoFileExists(c, shortFile.Name()) + }, 100*time.Millisecond, time.Millisecond) + // Stop consuming before long file has been fully consumed cancel() wg.Wait() - // short file was fully consumed and should have been deleted - require.NoFileExists(t, shortFile.Name()) - - // long file was partially consumed and should NOT have been deleted + // Long file was partially consumed and should NOT have been deleted. require.FileExists(t, longFile.Name()) } diff --git a/pkg/stanza/fileconsumer/internal/reader/reader.go b/pkg/stanza/fileconsumer/internal/reader/reader.go index 720f50b9d9d5..ef5e2e7d5bc9 100644 --- a/pkg/stanza/fileconsumer/internal/reader/reader.go +++ b/pkg/stanza/fileconsumer/internal/reader/reader.go @@ -82,7 +82,6 @@ func (r *Reader) ReadToEnd(ctx context.Context) { s := scanner.New(r, r.MaxLogSize, scanner.DefaultBufferSize, r.Offset, r.splitFunc) // Iterate over the tokenized file, emitting entries as we go - var eof bool for { select { case <-ctx.Done(): @@ -92,10 +91,10 @@ func (r *Reader) ReadToEnd(ctx context.Context) { ok := s.Scan() if !ok { - if err := s.Error(); err == nil { - eof = true - } else { + if err := s.Error(); err != nil { r.logger.Errorw("Failed during scan", zap.Error(err)) + } else if r.DeleteAtEOF { + r.delete() } break } @@ -122,12 +121,8 @@ func (r *Reader) ReadToEnd(ctx context.Context) { r.logger.Errorw("process: %w", zap.Error(err)) } } - r.Offset = s.Pos() } - if eof && r.DeleteAtEOF { - r.delete() - } } func (r *Reader) finalizeHeader() { diff --git a/pkg/stanza/operator/input/windows/config.go b/pkg/stanza/operator/input/windows/config.go new file mode 100644 index 000000000000..3fe9e71ee352 --- /dev/null +++ b/pkg/stanza/operator/input/windows/config.go @@ -0,0 +1,38 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package windows // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/windows" + +import ( + "time" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const operatorType = "windows_eventlog_input" + +// NewConfig will return an event log config with default values. +func NewConfig() *Config { + return NewConfigWithID(operatorType) +} + +// NewConfig will return an event log config with default values. +func NewConfigWithID(operatorID string) *Config { + return &Config{ + InputConfig: helper.NewInputConfig(operatorID, operatorType), + MaxReads: 100, + StartAt: "end", + PollInterval: 1 * time.Second, + } +} + +// Config is the configuration of a windows event log operator. +type Config struct { + helper.InputConfig `mapstructure:",squash"` + Channel string `mapstructure:"channel"` + MaxReads int `mapstructure:"max_reads,omitempty"` + StartAt string `mapstructure:"start_at,omitempty"` + PollInterval time.Duration `mapstructure:"poll_interval,omitempty"` + Raw bool `mapstructure:"raw,omitempty"` + ExcludeProviders []string `mapstructure:"exclude_providers,omitempty"` +} diff --git a/pkg/stanza/operator/input/windows/operator.go b/pkg/stanza/operator/input/windows/operator.go index c34a0db6086d..8900862eef50 100644 --- a/pkg/stanza/operator/input/windows/operator.go +++ b/pkg/stanza/operator/input/windows/operator.go @@ -12,44 +12,15 @@ import ( "sync" "time" - "go.uber.org/zap" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" + "go.uber.org/zap" ) -const operatorType = "windows_eventlog_input" - func init() { operator.Register(operatorType, func() operator.Builder { return NewConfig() }) } -// NewConfig will return an event log config with default values. -func NewConfig() *Config { - return NewConfigWithID(operatorType) -} - -// NewConfig will return an event log config with default values. -func NewConfigWithID(operatorID string) *Config { - return &Config{ - InputConfig: helper.NewInputConfig(operatorID, operatorType), - MaxReads: 100, - StartAt: "end", - PollInterval: 1 * time.Second, - } -} - -// Config is the configuration of a windows event log operator. -type Config struct { - helper.InputConfig `mapstructure:",squash"` - Channel string `mapstructure:"channel"` - MaxReads int `mapstructure:"max_reads,omitempty"` - StartAt string `mapstructure:"start_at,omitempty"` - PollInterval time.Duration `mapstructure:"poll_interval,omitempty"` - Raw bool `mapstructure:"raw,omitempty"` - ExcludeProviders []string `mapstructure:"exclude_providers,omitempty"` -} - // Build will build a windows event log operator. func (c *Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { inputOperator, err := c.InputConfig.Build(logger) diff --git a/processor/resourcedetectionprocessor/README.md b/processor/resourcedetectionprocessor/README.md index 87ff503f3d49..1e2deb0057ad 100644 --- a/processor/resourcedetectionprocessor/README.md +++ b/processor/resourcedetectionprocessor/README.md @@ -48,6 +48,7 @@ Queries the host machine to retrieve the following resource attributes: * host.arch * host.name * host.id + * host.ip * host.cpu.vendor.id * host.cpu.family * host.cpu.model.id diff --git a/processor/resourcedetectionprocessor/go.mod b/processor/resourcedetectionprocessor/go.mod index 8408c6bb7c21..9226a509ea4b 100644 --- a/processor/resourcedetectionprocessor/go.mod +++ b/processor/resourcedetectionprocessor/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( cloud.google.com/go/compute/metadata v0.2.3 github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.21.0 - github.com/aws/aws-sdk-go v1.48.5 + github.com/aws/aws-sdk-go v1.48.9 github.com/google/go-cmp v0.6.0 github.com/hashicorp/consul/api v1.26.1 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.90.0 diff --git a/processor/resourcedetectionprocessor/go.sum b/processor/resourcedetectionprocessor/go.sum index 19a4b0f541dc..2c29177e63b5 100644 --- a/processor/resourcedetectionprocessor/go.sum +++ b/processor/resourcedetectionprocessor/go.sum @@ -58,8 +58,8 @@ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= diff --git a/processor/resourcedetectionprocessor/internal/system/internal/metadata/generated_config.go b/processor/resourcedetectionprocessor/internal/system/internal/metadata/generated_config.go index da7b6f2f8bfd..121383329fc0 100644 --- a/processor/resourcedetectionprocessor/internal/system/internal/metadata/generated_config.go +++ b/processor/resourcedetectionprocessor/internal/system/internal/metadata/generated_config.go @@ -33,6 +33,7 @@ type ResourceAttributesConfig struct { HostCPUStepping ResourceAttributeConfig `mapstructure:"host.cpu.stepping"` HostCPUVendorID ResourceAttributeConfig `mapstructure:"host.cpu.vendor.id"` HostID ResourceAttributeConfig `mapstructure:"host.id"` + HostIP ResourceAttributeConfig `mapstructure:"host.ip"` HostName ResourceAttributeConfig `mapstructure:"host.name"` OsDescription ResourceAttributeConfig `mapstructure:"os.description"` OsType ResourceAttributeConfig `mapstructure:"os.type"` @@ -64,6 +65,9 @@ func DefaultResourceAttributesConfig() ResourceAttributesConfig { HostID: ResourceAttributeConfig{ Enabled: false, }, + HostIP: ResourceAttributeConfig{ + Enabled: false, + }, HostName: ResourceAttributeConfig{ Enabled: true, }, diff --git a/processor/resourcedetectionprocessor/internal/system/internal/metadata/generated_config_test.go b/processor/resourcedetectionprocessor/internal/system/internal/metadata/generated_config_test.go index 343eef8d19fb..22c74d9ed2f0 100644 --- a/processor/resourcedetectionprocessor/internal/system/internal/metadata/generated_config_test.go +++ b/processor/resourcedetectionprocessor/internal/system/internal/metadata/generated_config_test.go @@ -33,6 +33,7 @@ func TestResourceAttributesConfig(t *testing.T) { HostCPUStepping: ResourceAttributeConfig{Enabled: true}, HostCPUVendorID: ResourceAttributeConfig{Enabled: true}, HostID: ResourceAttributeConfig{Enabled: true}, + HostIP: ResourceAttributeConfig{Enabled: true}, HostName: ResourceAttributeConfig{Enabled: true}, OsDescription: ResourceAttributeConfig{Enabled: true}, OsType: ResourceAttributeConfig{Enabled: true}, @@ -49,6 +50,7 @@ func TestResourceAttributesConfig(t *testing.T) { HostCPUStepping: ResourceAttributeConfig{Enabled: false}, HostCPUVendorID: ResourceAttributeConfig{Enabled: false}, HostID: ResourceAttributeConfig{Enabled: false}, + HostIP: ResourceAttributeConfig{Enabled: false}, HostName: ResourceAttributeConfig{Enabled: false}, OsDescription: ResourceAttributeConfig{Enabled: false}, OsType: ResourceAttributeConfig{Enabled: false}, diff --git a/processor/resourcedetectionprocessor/internal/system/internal/metadata/generated_resource.go b/processor/resourcedetectionprocessor/internal/system/internal/metadata/generated_resource.go index 6f4c3ab83d5a..0391f5824501 100644 --- a/processor/resourcedetectionprocessor/internal/system/internal/metadata/generated_resource.go +++ b/processor/resourcedetectionprocessor/internal/system/internal/metadata/generated_resource.go @@ -77,6 +77,13 @@ func (rb *ResourceBuilder) SetHostID(val string) { } } +// SetHostIP sets provided value as "host.ip" attribute. +func (rb *ResourceBuilder) SetHostIP(val []any) { + if rb.config.HostIP.Enabled { + rb.res.Attributes().PutEmptySlice("host.ip").FromRaw(val) + } +} + // SetHostName sets provided value as "host.name" attribute. func (rb *ResourceBuilder) SetHostName(val string) { if rb.config.HostName.Enabled { diff --git a/processor/resourcedetectionprocessor/internal/system/internal/metadata/generated_resource_test.go b/processor/resourcedetectionprocessor/internal/system/internal/metadata/generated_resource_test.go index b7a089dc8150..38e5c08065bb 100644 --- a/processor/resourcedetectionprocessor/internal/system/internal/metadata/generated_resource_test.go +++ b/processor/resourcedetectionprocessor/internal/system/internal/metadata/generated_resource_test.go @@ -21,6 +21,7 @@ func TestResourceBuilder(t *testing.T) { rb.SetHostCPUStepping(17) rb.SetHostCPUVendorID("host.cpu.vendor.id-val") rb.SetHostID("host.id-val") + rb.SetHostIP([]any{"host.ip-item1", "host.ip-item2"}) rb.SetHostName("host.name-val") rb.SetOsDescription("os.description-val") rb.SetOsType("os.type-val") @@ -32,7 +33,7 @@ func TestResourceBuilder(t *testing.T) { case "default": assert.Equal(t, 2, res.Attributes().Len()) case "all_set": - assert.Equal(t, 11, res.Attributes().Len()) + assert.Equal(t, 12, res.Attributes().Len()) case "none_set": assert.Equal(t, 0, res.Attributes().Len()) return @@ -80,6 +81,11 @@ func TestResourceBuilder(t *testing.T) { if ok { assert.EqualValues(t, "host.id-val", val.Str()) } + val, ok = res.Attributes().Get("host.ip") + assert.Equal(t, test == "all_set", ok) + if ok { + assert.EqualValues(t, []any{"host.ip-item1", "host.ip-item2"}, val.Slice().AsRaw()) + } val, ok = res.Attributes().Get("host.name") assert.True(t, ok) if ok { diff --git a/processor/resourcedetectionprocessor/internal/system/internal/metadata/testdata/config.yaml b/processor/resourcedetectionprocessor/internal/system/internal/metadata/testdata/config.yaml index 94a441d4590e..d258480c7b00 100644 --- a/processor/resourcedetectionprocessor/internal/system/internal/metadata/testdata/config.yaml +++ b/processor/resourcedetectionprocessor/internal/system/internal/metadata/testdata/config.yaml @@ -17,6 +17,8 @@ all_set: enabled: true host.id: enabled: true + host.ip: + enabled: true host.name: enabled: true os.description: @@ -41,6 +43,8 @@ none_set: enabled: false host.id: enabled: false + host.ip: + enabled: false host.name: enabled: false os.description: diff --git a/processor/resourcedetectionprocessor/internal/system/metadata.yaml b/processor/resourcedetectionprocessor/internal/system/metadata.yaml index 6cf860cebc71..3b5acbcbef55 100644 --- a/processor/resourcedetectionprocessor/internal/system/metadata.yaml +++ b/processor/resourcedetectionprocessor/internal/system/metadata.yaml @@ -23,6 +23,10 @@ resource_attributes: description: The host.arch type: string enabled: false + host.ip: + description: IP addresses for the host + type: slice + enabled: false host.cpu.vendor.id: description: The host.cpu.vendor.id type: string diff --git a/processor/resourcedetectionprocessor/internal/system/system.go b/processor/resourcedetectionprocessor/internal/system/system.go index cecce5c1a10f..a62eab4287e7 100644 --- a/processor/resourcedetectionprocessor/internal/system/system.go +++ b/processor/resourcedetectionprocessor/internal/system/system.go @@ -25,7 +25,7 @@ var ( hostCPUModelAndFamilyAsStringID = "processor.resourcedetection.hostCPUModelAndFamilyAsString" hostCPUModelAndFamilyAsStringFeatureGate = featuregate.GlobalRegistry().MustRegister( hostCPUModelAndFamilyAsStringID, - featuregate.StageAlpha, + featuregate.StageBeta, featuregate.WithRegisterDescription("Change type of host.cpu.model.id and host.cpu.model.family to string."), featuregate.WithRegisterFromVersion("v0.89.0"), featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/semantic-conventions/issues/495"), @@ -83,6 +83,17 @@ func (d *Detector) Detect(ctx context.Context) (resource pcommon.Resource, schem return pcommon.NewResource(), "", fmt.Errorf("failed getting host architecture: %w", err) } + var hostIPAttribute []any + if d.cfg.ResourceAttributes.HostIP.Enabled { + hostIPs, errIPs := d.provider.HostIPs() + if errIPs != nil { + return pcommon.NewResource(), "", fmt.Errorf("failed getting host IP addresses: %w", errIPs) + } + for _, ip := range hostIPs { + hostIPAttribute = append(hostIPAttribute, ip.String()) + } + } + osDescription, err := d.provider.OSDescription(ctx) if err != nil { return pcommon.NewResource(), "", fmt.Errorf("failed getting OS description: %w", err) @@ -107,6 +118,7 @@ func (d *Detector) Detect(ctx context.Context) (resource pcommon.Resource, schem } } d.rb.SetHostArch(hostArch) + d.rb.SetHostIP(hostIPAttribute) d.rb.SetOsDescription(osDescription) if len(cpuInfo) > 0 { err = setHostCPUInfo(d, cpuInfo[0]) @@ -160,13 +172,13 @@ func setHostCPUInfo(d *Detector, cpuInfo cpu.InfoStat) error { d.logger.Debug("getting host's cpuinfo", zap.String("coreID", cpuInfo.CoreID)) d.rb.SetHostCPUVendorID(cpuInfo.VendorID) if hostCPUModelAndFamilyAsStringFeatureGate.IsEnabled() { - d.rb.SetHostCPUFamily(cpuInfo.Family) - } else { // https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/29025 - d.logger.Warn("This attribute will change from int to string. Switch now using the feature gate.", + d.logger.Info("This attribute changed from int to string. Temporarily switch back to int using the feature gate.", zap.String("attribute", "host.cpu.family"), zap.String("feature gate", hostCPUModelAndFamilyAsStringID), ) + d.rb.SetHostCPUFamily(cpuInfo.Family) + } else { family, err := strconv.ParseInt(cpuInfo.Family, 10, 64) if err != nil { return fmt.Errorf("failed to convert cpuinfo family to integer: %w", err) @@ -179,13 +191,13 @@ func setHostCPUInfo(d *Detector, cpuInfo cpu.InfoStat) error { // ISSUE: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/27675 if cpuInfo.Model != "" { if hostCPUModelAndFamilyAsStringFeatureGate.IsEnabled() { - d.rb.SetHostCPUModelID(cpuInfo.Model) - } else { // https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/29025 - d.logger.Warn("This attribute will change from int to string. Switch now using the feature gate.", + d.logger.Info("This attribute changed from int to string. Temporarily switch back to int using the feature gate.", zap.String("attribute", "host.cpu.model.id"), zap.String("feature gate", hostCPUModelAndFamilyAsStringID), ) + d.rb.SetHostCPUModelID(cpuInfo.Model) + } else { model, err := strconv.ParseInt(cpuInfo.Model, 10, 64) if err != nil { return fmt.Errorf("failed to convert cpuinfo model to integer: %w", err) diff --git a/processor/resourcedetectionprocessor/internal/system/system_test.go b/processor/resourcedetectionprocessor/internal/system/system_test.go index 03d8ef665064..497f134ddf8f 100644 --- a/processor/resourcedetectionprocessor/internal/system/system_test.go +++ b/processor/resourcedetectionprocessor/internal/system/system_test.go @@ -6,6 +6,7 @@ package system import ( "context" "errors" + "net" "testing" "github.com/stretchr/testify/assert" @@ -66,6 +67,16 @@ func (m *mockMetadata) ReverseLookupHost() (string, error) { return args.String(0), args.Error(1) } +func (m *mockMetadata) HostIPs() ([]net.IP, error) { + args := m.MethodCalled("HostIPs") + return args.Get(0).([]net.IP), args.Error(1) +} + +var ( + testIPsAttribute = []any{"192.168.1.140", "fe80::abc2:4a28:737a:609e"} + testIPsAddresses = []net.IP{net.ParseIP(testIPsAttribute[0].(string)), net.ParseIP(testIPsAttribute[1].(string))} +) + func TestNewDetector(t *testing.T) { tests := []struct { name string @@ -97,6 +108,7 @@ func allEnabledConfig() metadata.ResourceAttributesConfig { cfg := metadata.DefaultResourceAttributesConfig() cfg.HostArch.Enabled = true cfg.HostID.Enabled = true + cfg.HostIP.Enabled = true cfg.OsDescription.Enabled = true return cfg } @@ -108,6 +120,7 @@ func TestDetectFQDNAvailable(t *testing.T) { md.On("OSType").Return("darwin", nil) md.On("HostID").Return("2", nil) md.On("HostArch").Return("amd64", nil) + md.On("HostIPs").Return(testIPsAddresses, nil) detector := newTestDetector(md, []string{"dns"}, allEnabledConfig()) res, schemaURL, err := detector.Detect(context.Background()) @@ -121,6 +134,7 @@ func TestDetectFQDNAvailable(t *testing.T) { conventions.AttributeOSType: "darwin", conventions.AttributeHostID: "2", conventions.AttributeHostArch: conventions.AttributeHostArchAMD64, + "host.ip": testIPsAttribute, } assert.Equal(t, expected, res.Attributes().AsRaw()) @@ -141,6 +155,7 @@ func TestFallbackHostname(t *testing.T) { assert.Equal(t, conventions.SchemaURL, schemaURL) mdHostname.AssertExpectations(t) mdHostname.AssertNotCalled(t, "HostID") + mdHostname.AssertNotCalled(t, "HostIPs") expected := map[string]any{ conventions.AttributeHostName: "hostname", @@ -158,6 +173,7 @@ func TestEnableHostID(t *testing.T) { mdHostname.On("OSType").Return("darwin", nil) mdHostname.On("HostID").Return("3", nil) mdHostname.On("HostArch").Return("amd64", nil) + mdHostname.On("HostIPs").Return(testIPsAddresses, nil) detector := newTestDetector(mdHostname, []string{"dns", "os"}, allEnabledConfig()) res, schemaURL, err := detector.Detect(context.Background()) @@ -171,6 +187,7 @@ func TestEnableHostID(t *testing.T) { conventions.AttributeOSType: "darwin", conventions.AttributeHostID: "3", conventions.AttributeHostArch: conventions.AttributeHostArchAMD64, + "host.ip": testIPsAttribute, } assert.Equal(t, expected, res.Attributes().AsRaw()) @@ -183,6 +200,7 @@ func TestUseHostname(t *testing.T) { mdHostname.On("OSType").Return("darwin", nil) mdHostname.On("HostID").Return("1", nil) mdHostname.On("HostArch").Return("amd64", nil) + mdHostname.On("HostIPs").Return(testIPsAddresses, nil) detector := newTestDetector(mdHostname, []string{"os"}, allEnabledConfig()) res, schemaURL, err := detector.Detect(context.Background()) @@ -196,6 +214,7 @@ func TestUseHostname(t *testing.T) { conventions.AttributeOSType: "darwin", conventions.AttributeHostID: "1", conventions.AttributeHostArch: conventions.AttributeHostArchAMD64, + "host.ip": testIPsAttribute, } assert.Equal(t, expected, res.Attributes().AsRaw()) @@ -210,6 +229,7 @@ func TestDetectError(t *testing.T) { mdFQDN.On("Hostname").Return("", errors.New("err")) mdFQDN.On("HostID").Return("", errors.New("err")) mdFQDN.On("HostArch").Return("amd64", nil) + mdFQDN.On("HostIPs").Return(testIPsAddresses, nil) detector := newTestDetector(mdFQDN, []string{"dns"}, allEnabledConfig()) res, schemaURL, err := detector.Detect(context.Background()) @@ -224,6 +244,7 @@ func TestDetectError(t *testing.T) { mdHostname.On("Hostname").Return("", errors.New("err")) mdHostname.On("HostID").Return("", errors.New("err")) mdHostname.On("HostArch").Return("amd64", nil) + mdHostname.On("HostIPs").Return(testIPsAddresses, nil) detector = newTestDetector(mdHostname, []string{"os"}, allEnabledConfig()) res, schemaURL, err = detector.Detect(context.Background()) @@ -238,6 +259,7 @@ func TestDetectError(t *testing.T) { mdOSType.On("OSType").Return("", errors.New("err")) mdOSType.On("HostID").Return("1", nil) mdOSType.On("HostArch").Return("amd64", nil) + mdOSType.On("HostIPs").Return(testIPsAddresses, nil) detector = newTestDetector(mdOSType, []string{"os"}, allEnabledConfig()) res, schemaURL, err = detector.Detect(context.Background()) @@ -252,6 +274,7 @@ func TestDetectError(t *testing.T) { mdHostID.On("OSType").Return("linux", nil) mdHostID.On("HostID").Return("", errors.New("err")) mdHostID.On("HostArch").Return("arm64", nil) + mdHostID.On("HostIPs").Return(testIPsAddresses, nil) detector = newTestDetector(mdHostID, []string{"os"}, allEnabledConfig()) res, schemaURL, err = detector.Detect(context.Background()) @@ -262,6 +285,7 @@ func TestDetectError(t *testing.T) { conventions.AttributeOSDescription: "Ubuntu 22.04.2 LTS (Jammy Jellyfish)", conventions.AttributeOSType: "linux", conventions.AttributeHostArch: conventions.AttributeHostArchARM64, + "host.ip": testIPsAttribute, }, res.Attributes().AsRaw()) } diff --git a/processor/transformprocessor/internal/common/logs.go b/processor/transformprocessor/internal/common/logs.go index 7af9031d5011..83f2e81e9bce 100644 --- a/processor/transformprocessor/internal/common/logs.go +++ b/processor/transformprocessor/internal/common/logs.go @@ -19,7 +19,7 @@ import ( var _ consumer.Logs = &logStatements{} type logStatements struct { - ottl.Statements[ottllog.TransformContext] + ottl.StatementSequence[ottllog.TransformContext] } func (l logStatements) Capabilities() consumer.Capabilities { @@ -105,7 +105,7 @@ func (pc LogParserCollection) ParseContextStatements(contextStatements ContextSt if err != nil { return nil, err } - lStatements := ottllog.NewStatements(parsedStatements, pc.settings, ottllog.WithErrorMode(pc.errorMode)) + lStatements := ottllog.NewStatementSequence(parsedStatements, pc.settings, ottllog.WithStatementSequenceErrorMode(pc.errorMode)) return logStatements{lStatements}, nil default: statements, err := pc.parseCommonContextStatements(contextStatements) diff --git a/processor/transformprocessor/internal/common/metrics.go b/processor/transformprocessor/internal/common/metrics.go index becce3132cae..602245ac0015 100644 --- a/processor/transformprocessor/internal/common/metrics.go +++ b/processor/transformprocessor/internal/common/metrics.go @@ -21,7 +21,7 @@ import ( var _ consumer.Metrics = &metricStatements{} type metricStatements struct { - ottl.Statements[ottlmetric.TransformContext] + ottl.StatementSequence[ottlmetric.TransformContext] } func (m metricStatements) Capabilities() consumer.Capabilities { @@ -51,7 +51,7 @@ func (m metricStatements) ConsumeMetrics(ctx context.Context, md pmetric.Metrics var _ consumer.Metrics = &dataPointStatements{} type dataPointStatements struct { - ottl.Statements[ottldatapoint.TransformContext] + ottl.StatementSequence[ottldatapoint.TransformContext] } func (d dataPointStatements) Capabilities() consumer.Capabilities { @@ -206,14 +206,14 @@ func (pc MetricParserCollection) ParseContextStatements(contextStatements Contex if err != nil { return nil, err } - mStatements := ottlmetric.NewStatements(parseStatements, pc.settings, ottlmetric.WithErrorMode(pc.errorMode)) + mStatements := ottlmetric.NewStatementSequence(parseStatements, pc.settings, ottlmetric.WithStatementSequenceErrorMode(pc.errorMode)) return metricStatements{mStatements}, nil case DataPoint: parsedStatements, err := pc.dataPointParser.ParseStatements(contextStatements.Statements) if err != nil { return nil, err } - dpStatements := ottldatapoint.NewStatements(parsedStatements, pc.settings, ottldatapoint.WithErrorMode(pc.errorMode)) + dpStatements := ottldatapoint.NewStatementSequence(parsedStatements, pc.settings, ottldatapoint.WithStatementSequenceErrorMode(pc.errorMode)) return dataPointStatements{dpStatements}, nil default: statements, err := pc.parseCommonContextStatements(contextStatements) diff --git a/processor/transformprocessor/internal/common/processor.go b/processor/transformprocessor/internal/common/processor.go index 56e658b96d40..e3f291c4242f 100644 --- a/processor/transformprocessor/internal/common/processor.go +++ b/processor/transformprocessor/internal/common/processor.go @@ -24,7 +24,7 @@ var _ consumer.Logs = &resourceStatements{} var _ baseContext = &resourceStatements{} type resourceStatements struct { - ottl.Statements[ottlresource.TransformContext] + ottl.StatementSequence[ottlresource.TransformContext] } func (r resourceStatements) Capabilities() consumer.Capabilities { @@ -75,7 +75,7 @@ var _ consumer.Logs = &scopeStatements{} var _ baseContext = &scopeStatements{} type scopeStatements struct { - ottl.Statements[ottlscope.TransformContext] + ottl.StatementSequence[ottlscope.TransformContext] } func (s scopeStatements) Capabilities() consumer.Capabilities { @@ -149,14 +149,14 @@ func (pc parserCollection) parseCommonContextStatements(contextStatement Context if err != nil { return nil, err } - rStatements := ottlresource.NewStatements(parsedStatements, pc.settings, ottlresource.WithErrorMode(pc.errorMode)) + rStatements := ottlresource.NewStatementSequence(parsedStatements, pc.settings, ottlresource.WithStatementSequenceErrorMode(pc.errorMode)) return resourceStatements{rStatements}, nil case Scope: parsedStatements, err := pc.scopeParser.ParseStatements(contextStatement.Statements) if err != nil { return nil, err } - sStatements := ottlscope.NewStatements(parsedStatements, pc.settings, ottlscope.WithErrorMode(pc.errorMode)) + sStatements := ottlscope.NewStatementSequence(parsedStatements, pc.settings, ottlscope.WithStatementSequenceErrorMode(pc.errorMode)) return scopeStatements{sStatements}, nil default: return nil, fmt.Errorf("unknown context %v", contextStatement.Context) diff --git a/processor/transformprocessor/internal/common/traces.go b/processor/transformprocessor/internal/common/traces.go index 55951eabc9cc..fe4c59709770 100644 --- a/processor/transformprocessor/internal/common/traces.go +++ b/processor/transformprocessor/internal/common/traces.go @@ -20,7 +20,7 @@ import ( var _ consumer.Traces = &traceStatements{} type traceStatements struct { - ottl.Statements[ottlspan.TransformContext] + ottl.StatementSequence[ottlspan.TransformContext] } func (t traceStatements) Capabilities() consumer.Capabilities { @@ -50,7 +50,7 @@ func (t traceStatements) ConsumeTraces(ctx context.Context, td ptrace.Traces) er var _ consumer.Traces = &spanEventStatements{} type spanEventStatements struct { - ottl.Statements[ottlspanevent.TransformContext] + ottl.StatementSequence[ottlspanevent.TransformContext] } func (s spanEventStatements) Capabilities() consumer.Capabilities { @@ -152,14 +152,14 @@ func (pc TraceParserCollection) ParseContextStatements(contextStatements Context if err != nil { return nil, err } - sStatements := ottlspan.NewStatements(parsedStatements, pc.settings, ottlspan.WithErrorMode(pc.errorMode)) + sStatements := ottlspan.NewStatementSequence(parsedStatements, pc.settings, ottlspan.WithStatementSequenceErrorMode(pc.errorMode)) return traceStatements{sStatements}, nil case SpanEvent: parsedStatements, err := pc.spanEventParser.ParseStatements(contextStatements.Statements) if err != nil { return nil, err } - seStatements := ottlspanevent.NewStatements(parsedStatements, pc.settings, ottlspanevent.WithErrorMode(pc.errorMode)) + seStatements := ottlspanevent.NewStatementSequence(parsedStatements, pc.settings, ottlspanevent.WithStatementSequenceErrorMode(pc.errorMode)) return spanEventStatements{seStatements}, nil default: return pc.parseCommonContextStatements(contextStatements) diff --git a/receiver/awscloudwatchreceiver/go.mod b/receiver/awscloudwatchreceiver/go.mod index 27bab178452b..30897a5f29b8 100644 --- a/receiver/awscloudwatchreceiver/go.mod +++ b/receiver/awscloudwatchreceiver/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsclo go 1.20 require ( - github.com/aws/aws-sdk-go v1.48.5 + github.com/aws/aws-sdk-go v1.48.9 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.90.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.90.0 github.com/stretchr/testify v1.8.4 diff --git a/receiver/awscloudwatchreceiver/go.sum b/receiver/awscloudwatchreceiver/go.sum index f191c4cd5edf..4d6f5ddb6938 100644 --- a/receiver/awscloudwatchreceiver/go.sum +++ b/receiver/awscloudwatchreceiver/go.sum @@ -1,5 +1,5 @@ -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/receiver/awscontainerinsightreceiver/go.mod b/receiver/awscontainerinsightreceiver/go.mod index 4c767261e38e..80b5cb75400e 100644 --- a/receiver/awscontainerinsightreceiver/go.mod +++ b/receiver/awscontainerinsightreceiver/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscon go 1.20 require ( - github.com/aws/aws-sdk-go v1.48.5 + github.com/aws/aws-sdk-go v1.48.9 github.com/google/cadvisor v0.48.1 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.90.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.90.0 diff --git a/receiver/awscontainerinsightreceiver/go.sum b/receiver/awscontainerinsightreceiver/go.sum index 116a31dd708c..1818d58484b2 100644 --- a/receiver/awscontainerinsightreceiver/go.sum +++ b/receiver/awscontainerinsightreceiver/go.sum @@ -38,8 +38,8 @@ github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb0 github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= diff --git a/receiver/awsecscontainermetricsreceiver/go.mod b/receiver/awsecscontainermetricsreceiver/go.mod index 6796f2b138e5..423e65a36c5d 100644 --- a/receiver/awsecscontainermetricsreceiver/go.mod +++ b/receiver/awsecscontainermetricsreceiver/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecs go 1.20 require ( - github.com/aws/aws-sdk-go v1.48.5 + github.com/aws/aws-sdk-go v1.48.9 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.90.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.90.0 github.com/stretchr/testify v1.8.4 diff --git a/receiver/awsecscontainermetricsreceiver/go.sum b/receiver/awsecscontainermetricsreceiver/go.sum index 43b4203e6a95..ade2a3b07a80 100644 --- a/receiver/awsecscontainermetricsreceiver/go.sum +++ b/receiver/awsecscontainermetricsreceiver/go.sum @@ -1,5 +1,5 @@ -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/receiver/awsxrayreceiver/go.mod b/receiver/awsxrayreceiver/go.mod index 27237466fb8e..d32bae1f4965 100644 --- a/receiver/awsxrayreceiver/go.mod +++ b/receiver/awsxrayreceiver/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxra go 1.20 require ( - github.com/aws/aws-sdk-go v1.48.5 + github.com/aws/aws-sdk-go v1.48.9 github.com/google/go-cmp v0.6.0 github.com/google/uuid v1.4.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.90.0 diff --git a/receiver/awsxrayreceiver/go.sum b/receiver/awsxrayreceiver/go.sum index 5280aa58859a..f3ba516f411f 100644 --- a/receiver/awsxrayreceiver/go.sum +++ b/receiver/awsxrayreceiver/go.sum @@ -41,8 +41,8 @@ github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRF github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= diff --git a/receiver/datadogreceiver/go.mod b/receiver/datadogreceiver/go.mod index b60a34292bf8..7d5c880fbc17 100644 --- a/receiver/datadogreceiver/go.mod +++ b/receiver/datadogreceiver/go.mod @@ -6,7 +6,7 @@ require ( github.com/DataDog/datadog-agent/pkg/proto v0.50.0-devel github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.90.0 github.com/stretchr/testify v1.8.4 - github.com/vmihailenco/msgpack/v4 v4.3.12 + github.com/vmihailenco/msgpack/v4 v4.3.13 go.opentelemetry.io/collector/component v0.90.0 go.opentelemetry.io/collector/config/confighttp v0.90.0 go.opentelemetry.io/collector/consumer v0.90.0 diff --git a/receiver/datadogreceiver/go.sum b/receiver/datadogreceiver/go.sum index 5a6dede0aaaf..362345abc7ef 100644 --- a/receiver/datadogreceiver/go.sum +++ b/receiver/datadogreceiver/go.sum @@ -114,8 +114,8 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tinylib/msgp v1.1.9 h1:SHf3yoO2sGA0veCJeCBYLHuttAVFHGm2RHgNodW7wQU= github.com/tinylib/msgp v1.1.9/go.mod h1:BCXGB54lDD8qUEPmiG0cQQUANC4IUQyB2ItS2UDlO/k= -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/msgpack/v4 v4.3.13 h1:A2wsiTbvp63ilDaWmsk2wjx6xZdxQOvpiNlKBGKKXKI= +github.com/vmihailenco/msgpack/v4 v4.3.13/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= diff --git a/receiver/kafkametricsreceiver/go.mod b/receiver/kafkametricsreceiver/go.mod index 25f1186ac9e4..c21096e2d1f8 100644 --- a/receiver/kafkametricsreceiver/go.mod +++ b/receiver/kafkametricsreceiver/go.mod @@ -26,7 +26,7 @@ require ( github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Microsoft/hcsshim v0.11.1 // indirect - github.com/aws/aws-sdk-go v1.48.5 // indirect + github.com/aws/aws-sdk-go v1.48.9 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/containerd/containerd v1.7.7 // indirect diff --git a/receiver/kafkametricsreceiver/go.sum b/receiver/kafkametricsreceiver/go.sum index cd8f637d5672..a8ea20557a4b 100644 --- a/receiver/kafkametricsreceiver/go.sum +++ b/receiver/kafkametricsreceiver/go.sum @@ -12,8 +12,8 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Microsoft/hcsshim v0.11.1 h1:hJ3s7GbWlGK4YVV92sO88BQSyF4ZLVy7/awqOlPxFbA= github.com/Microsoft/hcsshim v0.11.1/go.mod h1:nFJmaO4Zr5Y7eADdFOpYswDDlNVbvcIJJNJLECr5JQg= -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= diff --git a/receiver/kafkareceiver/go.mod b/receiver/kafkareceiver/go.mod index c09d62048116..ac5d0b6fce55 100644 --- a/receiver/kafkareceiver/go.mod +++ b/receiver/kafkareceiver/go.mod @@ -27,7 +27,7 @@ require ( ) require ( - github.com/aws/aws-sdk-go v1.48.5 // indirect + github.com/aws/aws-sdk-go v1.48.9 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/eapache/go-resiliency v1.4.0 // indirect diff --git a/receiver/kafkareceiver/go.sum b/receiver/kafkareceiver/go.sum index 201c684eb419..83804d54ac51 100644 --- a/receiver/kafkareceiver/go.sum +++ b/receiver/kafkareceiver/go.sum @@ -6,8 +6,8 @@ github.com/IBM/sarama v1.42.1 h1:wugyWa15TDEHh2kvq2gAy1IHLjEjuYOYgXz/ruC/OSQ= github.com/IBM/sarama v1.42.1/go.mod h1:Xxho9HkHd4K/MDUo/T/sOqwtX/17D33++E9Wib6hUdQ= github.com/apache/thrift v0.19.0 h1:sOqkWPzMj7w6XaYbJQG7m4sGqVolaW/0D28Ln7yPzMk= github.com/apache/thrift v0.19.0/go.mod h1:SUALL216IiaOw2Oy+5Vs9lboJ/t9g40C+G07Dc0QC1I= -github.com/aws/aws-sdk-go v1.48.5 h1:cp3inTx9trQNCNZV/Id5S5egpilBXKdF32uKtb1LszI= -github.com/aws/aws-sdk-go v1.48.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.48.9 h1:vqzjg5FCi/QDWTEenBs65gu57GJdvkqZ0+5steFb44g= +github.com/aws/aws-sdk-go v1.48.9/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= diff --git a/receiver/oracledbreceiver/go.mod b/receiver/oracledbreceiver/go.mod index 2eada9e196b5..52565e5b2858 100644 --- a/receiver/oracledbreceiver/go.mod +++ b/receiver/oracledbreceiver/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/google/go-cmp v0.6.0 - github.com/sijms/go-ora/v2 v2.7.22 + github.com/sijms/go-ora/v2 v2.7.23 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/component v0.90.0 go.opentelemetry.io/collector/confmap v0.90.0 diff --git a/receiver/oracledbreceiver/go.sum b/receiver/oracledbreceiver/go.sum index fa09c3408aeb..f9fadcc53591 100644 --- a/receiver/oracledbreceiver/go.sum +++ b/receiver/oracledbreceiver/go.sum @@ -81,8 +81,8 @@ github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lne github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= github.com/prometheus/statsd_exporter v0.22.7 h1:7Pji/i2GuhK6Lu7DHrtTkFmNBCudCPT1pX2CziuyQR0= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= -github.com/sijms/go-ora/v2 v2.7.22 h1:B2mSLhDDWTgsjdM0d/O7iJn041cBy5z7fA8sR082vCg= -github.com/sijms/go-ora/v2 v2.7.22/go.mod h1:EHxlY6x7y9HAsdfumurRfTd+v8NrEOTR3Xl4FWlH6xk= +github.com/sijms/go-ora/v2 v2.7.23 h1:a9/7sm4bOnIhwcxMcilRAADxabLh90tMiryfMVslcK8= +github.com/sijms/go-ora/v2 v2.7.23/go.mod h1:EHxlY6x7y9HAsdfumurRfTd+v8NrEOTR3Xl4FWlH6xk= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= diff --git a/receiver/receivercreator/go.mod b/receiver/receivercreator/go.mod index 606d016c62d7..be90db4dec22 100644 --- a/receiver/receivercreator/go.mod +++ b/receiver/receivercreator/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.90.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.90.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.90.0 - github.com/spf13/cast v1.5.1 + github.com/spf13/cast v1.6.0 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/component v0.90.0 go.opentelemetry.io/collector/confmap v0.90.0 diff --git a/receiver/receivercreator/go.sum b/receiver/receivercreator/go.sum index b51332f5c0e1..d37b36ddf2fa 100644 --- a/receiver/receivercreator/go.sum +++ b/receiver/receivercreator/go.sum @@ -67,7 +67,7 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY= +github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -264,8 +264,8 @@ github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnj github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= -github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= +github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= +github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= diff --git a/receiver/saphanareceiver/go.mod b/receiver/saphanareceiver/go.mod index 8c768f64011f..08e043e588a7 100644 --- a/receiver/saphanareceiver/go.mod +++ b/receiver/saphanareceiver/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/saphan go 1.20 require ( - github.com/SAP/go-hdb v1.6.2 + github.com/SAP/go-hdb v1.6.3 github.com/google/go-cmp v0.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.90.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.90.0 @@ -47,7 +47,7 @@ require ( go.opentelemetry.io/otel/metric v1.21.0 // indirect go.opentelemetry.io/otel/trace v1.21.0 // indirect golang.org/x/crypto v0.16.0 // indirect - golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect + golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect golang.org/x/net v0.18.0 // indirect golang.org/x/sys v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect diff --git a/receiver/saphanareceiver/go.sum b/receiver/saphanareceiver/go.sum index 50ccbca494c2..5fb7595783f8 100644 --- a/receiver/saphanareceiver/go.sum +++ b/receiver/saphanareceiver/go.sum @@ -1,8 +1,8 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= contrib.go.opencensus.io/exporter/prometheus v0.4.2 h1:sqfsYl5GIY/L570iT+l93ehxaWJs2/OwXtiWwew3oAg= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/SAP/go-hdb v1.6.2 h1:sC0OjTEfPnycIktkCDvS7GelaGOiRrhWE0GWUt05QP8= -github.com/SAP/go-hdb v1.6.2/go.mod h1:xXsEywFErhpCuRVQ3HfjI7H7fPLYPMnMTWa9D5Enx0Q= +github.com/SAP/go-hdb v1.6.3 h1:O2DTMCf4vGYG7W6TjrSIezUz7y0mF5j/E6w6ol1pbho= +github.com/SAP/go-hdb v1.6.3/go.mod h1:TKQ0SvP6dwcVKCu4q9yisg5mTtWPoAbc3lLzkgrAC5M= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= @@ -142,8 +142,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= +golang.org/x/exp v0.0.0-20231127185646-65229373498e h1:Gvh4YaCaXNs6dKTlfgismwWZKyjVZXwOPfIyUaqU3No= +golang.org/x/exp v0.0.0-20231127185646-65229373498e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= diff --git a/receiver/sqlqueryreceiver/go.mod b/receiver/sqlqueryreceiver/go.mod index d129f42fb8f7..afedcf8d9214 100644 --- a/receiver/sqlqueryreceiver/go.mod +++ b/receiver/sqlqueryreceiver/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlque go 1.20 require ( - github.com/SAP/go-hdb v1.6.2 + github.com/SAP/go-hdb v1.6.3 github.com/denisenkom/go-mssqldb v0.12.3 github.com/docker/go-connections v0.4.0 github.com/go-sql-driver/mysql v1.7.1 @@ -12,7 +12,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.90.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.90.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.90.0 - github.com/sijms/go-ora/v2 v2.7.22 + github.com/sijms/go-ora/v2 v2.7.23 github.com/snowflakedb/gosnowflake v1.7.0 github.com/stretchr/testify v1.8.4 github.com/testcontainers/testcontainers-go v0.26.0 @@ -128,14 +128,14 @@ require ( go.opentelemetry.io/otel/metric v1.21.0 // indirect go.opentelemetry.io/otel/trace v1.21.0 // indirect golang.org/x/crypto v0.16.0 // indirect - golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa // indirect + golang.org/x/exp v0.0.0-20231127185646-65229373498e // indirect golang.org/x/mod v0.14.0 // indirect - golang.org/x/net v0.18.0 // indirect + golang.org/x/net v0.19.0 // indirect golang.org/x/sync v0.5.0 // indirect golang.org/x/sys v0.15.0 // indirect golang.org/x/term v0.15.0 // indirect golang.org/x/text v0.14.0 // indirect - golang.org/x/tools v0.15.0 // indirect + golang.org/x/tools v0.16.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect gonum.org/v1/gonum v0.14.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230822172742-b8732ec3820d // indirect diff --git a/receiver/sqlqueryreceiver/go.sum b/receiver/sqlqueryreceiver/go.sum index 6a36f425e397..91b1c9e25701 100644 --- a/receiver/sqlqueryreceiver/go.sum +++ b/receiver/sqlqueryreceiver/go.sum @@ -28,8 +28,8 @@ github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migc github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Microsoft/hcsshim v0.11.1 h1:hJ3s7GbWlGK4YVV92sO88BQSyF4ZLVy7/awqOlPxFbA= github.com/Microsoft/hcsshim v0.11.1/go.mod h1:nFJmaO4Zr5Y7eADdFOpYswDDlNVbvcIJJNJLECr5JQg= -github.com/SAP/go-hdb v1.6.2 h1:sC0OjTEfPnycIktkCDvS7GelaGOiRrhWE0GWUt05QP8= -github.com/SAP/go-hdb v1.6.2/go.mod h1:xXsEywFErhpCuRVQ3HfjI7H7fPLYPMnMTWa9D5Enx0Q= +github.com/SAP/go-hdb v1.6.3 h1:O2DTMCf4vGYG7W6TjrSIezUz7y0mF5j/E6w6ol1pbho= +github.com/SAP/go-hdb v1.6.3/go.mod h1:TKQ0SvP6dwcVKCu4q9yisg5mTtWPoAbc3lLzkgrAC5M= github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY3JY= github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/antonmedv/expr v1.15.5 h1:y0Iz3cEwmpRz5/r3w4qQR0MfIqJGdGM1zbhD/v0G5Vg= @@ -296,8 +296,8 @@ github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg 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/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/sijms/go-ora/v2 v2.7.22 h1:B2mSLhDDWTgsjdM0d/O7iJn041cBy5z7fA8sR082vCg= -github.com/sijms/go-ora/v2 v2.7.22/go.mod h1:EHxlY6x7y9HAsdfumurRfTd+v8NrEOTR3Xl4FWlH6xk= +github.com/sijms/go-ora/v2 v2.7.23 h1:a9/7sm4bOnIhwcxMcilRAADxabLh90tMiryfMVslcK8= +github.com/sijms/go-ora/v2 v2.7.23/go.mod h1:EHxlY6x7y9HAsdfumurRfTd+v8NrEOTR3Xl4FWlH6xk= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= @@ -376,8 +376,8 @@ golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY= golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa h1:FRnLl4eNAQl8hwxVVC17teOw8kdjVDVAiFMtgUdTSRQ= -golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa/go.mod h1:zk2irFbV9DP96SEBUUAy67IdHUaZuSnrz1n472HUCLE= +golang.org/x/exp v0.0.0-20231127185646-65229373498e h1:Gvh4YaCaXNs6dKTlfgismwWZKyjVZXwOPfIyUaqU3No= +golang.org/x/exp v0.0.0-20231127185646-65229373498e/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= @@ -400,8 +400,8 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.18.0 h1:mIYleuAkSbHh0tCv7RvjL3F6ZVbLjq4+R7zbOn3Kokg= -golang.org/x/net v0.18.0/go.mod h1:/czyP5RqHAH4odGYxBJ1qz0+CE5WZ+2j1YgoEo8F2jQ= +golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c= +golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -460,8 +460,8 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.15.0 h1:zdAyfUGbYmuVokhzVmghFl2ZJh5QhcfebBgmVPFYA+8= -golang.org/x/tools v0.15.0/go.mod h1:hpksKq4dtpQWS1uQ61JkdqWM3LscIS6Slf+VVkm+wQk= +golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM= +golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/receiver/windowseventlogreceiver/factory_test.go b/receiver/windowseventlogreceiver/factory_test.go index a39ea31c1e4b..e3218cbce507 100644 --- a/receiver/windowseventlogreceiver/factory_test.go +++ b/receiver/windowseventlogreceiver/factory_test.go @@ -4,9 +4,15 @@ package windowseventlogreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver" import ( + "context" + "runtime" "testing" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/receiver/receivertest" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver/internal/metadata" ) @@ -17,3 +23,31 @@ func TestNewFactory(t *testing.T) { require.EqualValues(t, metadata.Type, factory.Type()) }) } + +func TestCreateDefaultConfig(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + require.NotNil(t, cfg, "failed to create default config") +} + +func TestCreateAndShutdown(t *testing.T) { + factory := NewFactory() + defaultConfig := factory.CreateDefaultConfig() + cfg := defaultConfig.(*WindowsLogConfig) // This cast should work on all platforms. + cfg.InputConfig.Channel = "Application" // Must be explicitly set to a valid channel. + + ctx := context.Background() + settings := receivertest.NewNopCreateSettings() + sink := new(consumertest.LogsSink) + receiver, err := factory.CreateLogsReceiver(ctx, settings, cfg, sink) + + if runtime.GOOS != "windows" { + assert.Error(t, err) + assert.IsType(t, component.ErrDataTypeIsNotSupported, err) + assert.Nil(t, receiver) + } else { + assert.NoError(t, err) + require.NotNil(t, receiver) + require.NoError(t, receiver.Shutdown(ctx)) + } +} diff --git a/receiver/windowseventlogreceiver/receiver.go b/receiver/windowseventlogreceiver/receiver.go new file mode 100644 index 000000000000..40b236d8b55b --- /dev/null +++ b/receiver/windowseventlogreceiver/receiver.go @@ -0,0 +1,30 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package windowseventlogreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver" + +import ( + "go.opentelemetry.io/collector/component" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/consumerretry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/windows" +) + +// createDefaultConfig creates a config with type and version +func createDefaultConfig() component.Config { + return &WindowsLogConfig{ + BaseConfig: adapter.BaseConfig{ + Operators: []operator.Config{}, + RetryOnFailure: consumerretry.NewDefaultConfig(), + }, + InputConfig: *windows.NewConfig(), + } +} + +// WindowsLogConfig defines configuration for the windowseventlog receiver +type WindowsLogConfig struct { + InputConfig windows.Config `mapstructure:",squash"` + adapter.BaseConfig `mapstructure:",squash"` +} diff --git a/receiver/windowseventlogreceiver/receiver_others.go b/receiver/windowseventlogreceiver/receiver_others.go index e5eb1c6d041b..51891aac0802 100644 --- a/receiver/windowseventlogreceiver/receiver_others.go +++ b/receiver/windowseventlogreceiver/receiver_others.go @@ -14,8 +14,6 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver/internal/metadata" ) @@ -27,14 +25,6 @@ func newFactoryAdapter() receiver.Factory { receiver.WithLogs(createLogsReceiver, metadata.LogsStability)) } -func createDefaultConfig() component.Config { - return &WindowsLogConfig{ - BaseConfig: adapter.BaseConfig{ - Operators: []operator.Config{}, - }, - } -} - func createLogsReceiver( _ context.Context, _ receiver.CreateSettings, @@ -43,8 +33,3 @@ func createLogsReceiver( ) (receiver.Logs, error) { return nil, fmt.Errorf("windows eventlog receiver is only supported on Windows") } - -// WindowsLogConfig defines configuration for the windowseventlog receiver -type WindowsLogConfig struct { - adapter.BaseConfig `mapstructure:",squash"` -} diff --git a/receiver/windowseventlogreceiver/receiver_windows.go b/receiver/windowseventlogreceiver/receiver_windows.go index e3e8d5e9742e..0ce0aec9e4ae 100644 --- a/receiver/windowseventlogreceiver/receiver_windows.go +++ b/receiver/windowseventlogreceiver/receiver_windows.go @@ -10,10 +10,8 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/receiver" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/consumerretry" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/windows" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowseventlogreceiver/internal/metadata" ) @@ -33,13 +31,7 @@ func (f ReceiverType) Type() component.Type { // CreateDefaultConfig creates a config with type and version func (f ReceiverType) CreateDefaultConfig() component.Config { - return &WindowsLogConfig{ - BaseConfig: adapter.BaseConfig{ - Operators: []operator.Config{}, - RetryOnFailure: consumerretry.NewDefaultConfig(), - }, - InputConfig: *windows.NewConfig(), - } + return createDefaultConfig() } // BaseConfig gets the base config from config, for now @@ -51,9 +43,3 @@ func (f ReceiverType) BaseConfig(cfg component.Config) adapter.BaseConfig { func (f ReceiverType) InputConfig(cfg component.Config) operator.Config { return operator.NewConfig(&cfg.(*WindowsLogConfig).InputConfig) } - -// WindowsLogConfig defines configuration for the windowseventlog receiver -type WindowsLogConfig struct { - InputConfig windows.Config `mapstructure:",squash"` - adapter.BaseConfig `mapstructure:",squash"` -} diff --git a/testbed/go.sum b/testbed/go.sum index 7b87cc3cbb7a..b454610aa926 100644 --- a/testbed/go.sum +++ b/testbed/go.sum @@ -618,8 +618,8 @@ github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaO github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= -github.com/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/msgpack/v4 v4.3.13 h1:A2wsiTbvp63ilDaWmsk2wjx6xZdxQOvpiNlKBGKKXKI= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs=