diff --git a/.github/workflows/release-layer-collector.yml b/.github/workflows/release-layer-collector.yml index 32e64b6761..16c4355b93 100644 --- a/.github/workflows/release-layer-collector.yml +++ b/.github/workflows/release-layer-collector.yml @@ -1,10 +1,9 @@ name: "Release Collector Lambda layer" on: - # (Using tag push instead of release to allow filtering by tag prefix.) push: - tags: - - layer-collector/** + branches: + - main permissions: id-token: write @@ -13,10 +12,38 @@ permissions: jobs: create-release: runs-on: ubuntu-latest + outputs: + NEW_TAG: ${{ steps.increment_tag.outputs.NEW_TAG }} steps: - uses: actions/checkout@v4 + with: + fetch-tags: true + fetch-depth: 0 + - name: Get the last tag + id: get_last_tag + run: | + cd ${{ github.workspace }} + pwd + last_tag=$(git describe --tags `git rev-list --tags --max-count=1`) + echo "::set-output name=last_tag::$last_tag" + # The following 15 lines of code were human modified suggestions given by GitHub Copilot + - name: Increment tag version + id: increment_tag + run: | + last_tag=${{ steps.get_last_tag.outputs.last_tag }} + prefix=$(echo $last_tag | cut -d'/' -f1) + major=$(echo $last_tag | cut -d'/' -f2 | cut -d'.' -f1) + minor=$(echo $last_tag | cut -d'/' -f2 | cut -d'.' -f2) + patch=$(echo $last_tag | cut -d'.' -f3) + new_major=$((major + 1)) + new_tag="$prefix/$new_major.0.0" + git tag $new_tag + git push origin $new_tag + echo "::set-output name=new_tag::$new_tag" + echo "NEW_TAG=$new_tag" >> $GITHUB_OUTPUT + NEW_TAG=$new_tag - name: Create Release - run: gh release create ${{ github.ref_name }} --draft --title ${{ github.ref_name }} + run: gh release create ${{ steps.increment_tag.outputs.new_tag }} --title ${{ steps.increment_tag.outputs.new_tag }} --generate-notes env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} build-layer: @@ -35,14 +62,14 @@ jobs: with: go-version: '^1.23.1' - name: build - run: make -C collector package GOARCH=${{ matrix.architecture }} + run: make -C collector package GOARCH=${{ matrix.architecture }} BUILDTAGS="lambdacomponents.custom,lambdacomponents.all" - uses: actions/upload-artifact@v4 with: name: opentelemetry-collector-layer-${{ matrix.architecture }}.zip path: ${{ github.workspace }}/collector/build/opentelemetry-collector-layer-${{ matrix.architecture }}.zip - name: Add Binary to Release run: | - gh release upload ${{github.ref_name}} ${{ github.workspace }}/collector/build/opentelemetry-collector-layer-${{ matrix.architecture }}.zip + gh release upload ${{ needs.create-release.outputs.NEW_TAG }} ${{ github.workspace }}/collector/build/opentelemetry-collector-layer-${{ matrix.architecture }}.zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Save Collector Version @@ -54,36 +81,37 @@ jobs: COLLECTOR_VERSION=$( ${{ github.workspace }}/collector/build/extensions/collector -v) echo "COLLECTOR_VERSION=$COLLECTOR_VERSION" >> $GITHUB_OUTPUT - publish-layer: - uses: ./.github/workflows/layer-publish.yml - needs: build-layer - strategy: - matrix: - architecture: - - amd64 - - arm64 - aws_region: - - ap-northeast-1 - - ap-northeast-2 - - ap-south-1 - - ap-southeast-1 - - ap-southeast-2 - - ca-central-1 - - eu-central-1 - - eu-north-1 - - eu-west-1 - - eu-west-2 - - eu-west-3 - - sa-east-1 - - us-east-1 - - us-east-2 - - us-west-1 - - us-west-2 - with: - artifact-name: opentelemetry-collector-layer-${{ matrix.architecture }}.zip - layer-name: opentelemetry-collector - component-version: ${{needs.build-layer.outputs.COLLECTOR_VERSION}} - architecture: ${{ matrix.architecture }} - release-group: prod - aws_region: ${{ matrix.aws_region }} - secrets: inherit + # Commented out since we don't publish the layer to AWS now + # publish-layer: + # uses: ./.github/workflows/layer-publish.yml + # needs: build-layer + # strategy: + # matrix: + # architecture: + # - amd64 + # - arm64 + # aws_region: + # - ap-northeast-1 + # - ap-northeast-2 + # - ap-south-1 + # - ap-southeast-1 + # - ap-southeast-2 + # - ca-central-1 + # - eu-central-1 + # - eu-north-1 + # - eu-west-1 + # - eu-west-2 + # - eu-west-3 + # - sa-east-1 + # - us-east-1 + # - us-east-2 + # - us-west-1 + # - us-west-2 + # with: + # artifact-name: opentelemetry-collector-layer-${{ matrix.architecture }}.zip + # layer-name: opentelemetry-collector + # component-version: ${{needs.build-layer.outputs.COLLECTOR_VERSION}} + # architecture: ${{ matrix.architecture }} + # release-group: prod + # aws_region: ${{ matrix.aws_region }} + # secrets: inherit diff --git a/collector/go.mod b/collector/go.mod index 44309846ee..73d7a44bd2 100644 --- a/collector/go.mod +++ b/collector/go.mod @@ -48,6 +48,7 @@ require ( github.com/aws/aws-sdk-go-v2/config v1.29.6 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.17.59 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.28 // indirect + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.54 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.32 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.32 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2 // indirect @@ -69,7 +70,7 @@ require ( github.com/ebitengine/purego v0.8.1 // indirect github.com/elastic/go-grok v0.3.1 // indirect github.com/elastic/lunes v0.1.0 // indirect - github.com/expr-lang/expr v1.16.9 // indirect + github.com/expr-lang/expr v1.17.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.8.0 // indirect github.com/go-logr/logr v1.4.2 // indirect @@ -105,6 +106,7 @@ require ( github.com/mostynb/go-grpc-compression v1.2.3 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.119.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter v0.119.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.119.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension v0.119.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.119.0 // indirect @@ -122,6 +124,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.119.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.119.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.119.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.119.0 // indirect github.com/open-telemetry/opentelemetry-lambda/collector/processor/coldstartprocessor v0.98.0 // indirect github.com/open-telemetry/opentelemetry-lambda/collector/processor/decoupleprocessor v0.0.0-00010101000000-000000000000 // indirect github.com/open-telemetry/opentelemetry-lambda/collector/receiver/telemetryapireceiver v0.98.0 // indirect @@ -143,6 +146,7 @@ require ( github.com/tidwall/pretty v1.2.0 // indirect github.com/tidwall/tinylru v1.1.0 // indirect github.com/tidwall/wal v1.1.8 // indirect + github.com/tilinna/clock v1.1.0 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 // indirect diff --git a/collector/go.sum b/collector/go.sum index b911d5db87..e88c6a9e12 100644 --- a/collector/go.sum +++ b/collector/go.sum @@ -20,6 +20,8 @@ github.com/aws/aws-sdk-go-v2/credentials v1.17.59 h1:9btwmrt//Q6JcSdgJOLI98sdr5p github.com/aws/aws-sdk-go-v2/credentials v1.17.59/go.mod h1:NM8fM6ovI3zak23UISdWidyZuI1ghNe2xjzUZAyT+08= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.28 h1:KwsodFKVQTlI5EyhRSugALzsV6mG/SGrdjlMXSZSdso= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.28/go.mod h1:EY3APf9MzygVhKuPXAc5H+MkGb8k/DOSQjWS0LgkKqI= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.54 h1:6BWOAho3Cgdy4cmNJ4HWY8VZgqODEU7Gw78XXireNZI= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.54/go.mod h1:n+t/oyYErOV3jf/GxNTVlizSM9RMV1yH7jvcIvld3Do= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.32 h1:BjUcr3X3K0wZPGFg2bxOWW3VPN8rkE3/61zhP+IHviA= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.32/go.mod h1:80+OGC/bgzzFFTUmcuwD0lb4YutwQeKLFpmt6hoWapU= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.32 h1:m1GeXHVMJsRsUAqG6HjZWx9dj7F5TR+cF1bjyfYyBd4= @@ -67,8 +69,8 @@ github.com/elastic/go-grok v0.3.1 h1:WEhUxe2KrwycMnlvMimJXvzRa7DoByJB4PVUIE1ZD/U github.com/elastic/go-grok v0.3.1/go.mod h1:n38ls8ZgOboZRgKcjMY8eFeZFMmcL9n2lP0iHhIDk64= github.com/elastic/lunes v0.1.0 h1:amRtLPjwkWtzDF/RKzcEPMvSsSseLDLW+bnhfNSLRe4= github.com/elastic/lunes v0.1.0/go.mod h1:xGphYIt3XdZRtyWosHQTErsQTd4OP1p9wsbVoHelrd4= -github.com/expr-lang/expr v1.16.9 h1:WUAzmR0JNI9JCiF0/ewwHB1gmcGw5wW7nWt8gc6PpCI= -github.com/expr-lang/expr v1.16.9/go.mod h1:8/vRC7+7HBzESEqt5kKpYXxrxkr31SaO8r40VO/1IT4= +github.com/expr-lang/expr v1.17.0 h1:+vpszOyzKLQXC9VF+wA8cVA0tlA984/Wabc/1hF9Whg= +github.com/expr-lang/expr v1.17.0/go.mod h1:8/vRC7+7HBzESEqt5kKpYXxrxkr31SaO8r40VO/1IT4= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M= @@ -164,6 +166,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/secre github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/secretsmanagerprovider v0.119.0/go.mod h1:6TogM+xLrHpq+/yXj1pXoOAfjEuR6VCNvJ63cx9UyTg= github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.119.0 h1:0eIwc699pvvChuyKDexhl3xovAQzc18xVOvxJ7tv9r8= github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.119.0/go.mod h1:Cmey/JEL25DSYfYNxSNpunKzuebMypjZs3VsNc4JSeU= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter v0.119.0 h1:0FAtPJ8yCZgMVRoKz1YjlaZhyOaV7QJWFDYpTVvMV2Y= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter v0.119.0/go.mod h1:3wvrLx2DPLts6vLXG6u+GdC/yvn1lpSDfiwiDnQGzZI= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.119.0 h1:Uw2qT8XxWEp+0YSeBEQuRlXgnvam8B3IR+6Qu0xKvwg= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.119.0/go.mod h1:zaYmXAbN866u9Wj/YAxlY4p2/lyzlE554Ql/FgI3J5A= github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension v0.119.0 h1:zzNRPHTSmLGXMO5G7gwJ1QkNuIYBR1Q13ctbw/PWd5U= @@ -180,6 +184,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0. github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.119.0/go.mod h1:Cx/iI+dXpsifBnU9Ch4hN1de5R8dvnyiQJecIc1ty7M= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/core/xidutils v0.119.0 h1:5F+Xa3A/xdlA9x2XdFEATeMhcU4R35TSIs3q6BynqCM= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/core/xidutils v0.119.0/go.mod h1:N6FGJBXj0QY/e9zjdlIWGCKHD+fKUwUtreAfAZRyoFA= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.119.0 h1:Nc1rvF/hxp8TwYOSsA2qmvIQlS+8lougZsyxcTN6U78= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.119.0/go.mod h1:7ePS4L6s7UcWxxgIQkAiI5db/OxwRAV9+kziKVIO3Y8= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.119.0 h1:ql3Ujsfiwd1uKAJfK+EbUnLXz1NcStK2q5PRNBqJaQY= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.119.0/go.mod h1:Df15ipOX4JryZDCEiFhByJNgycMOoO6AP0XB/oeqtH4= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.119.0 h1:2ztsxw6DH2CbXbykCGgPSZmHHRilNuD06VOfI/z9xGs= @@ -204,6 +210,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceproc github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.119.0/go.mod h1:acrmdOey6Ccj0jlgaHgWwRM9VmSfUaWdHm0H9Dz8GO4= github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.119.0 h1:HBQqRHsRIkJbG6iFHT8Q+TJPljwUSEd75wlqiHVtA5I= github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.119.0/go.mod h1:CEzAuqlTFNnxOUk8ix41TM1Bmembk+nKrhYzNN6r0NM= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.119.0 h1:8HlxU1CW9qRYBSp5LdJn904NhdXAuKsklQ8PGTbdiw8= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.119.0/go.mod h1:yRAFW+mmlDKUXAZ77h+EQ4s7z/RZaGK/YClpieva5aY= github.com/pierrec/lz4/v4 v4.1.22 h1:cKFw6uJDK+/gfw5BcDL0JL5aBsAFdsIT18eRtLj7VIU= github.com/pierrec/lz4/v4 v4.1.22/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -248,6 +256,8 @@ github.com/tidwall/tinylru v1.1.0 h1:XY6IUfzVTU9rpwdhKUF6nQdChgCdGjkMfLzbWyiau6I github.com/tidwall/tinylru v1.1.0/go.mod h1:3+bX+TJ2baOLMWTnlyNWHh4QMnFyARg2TLTQ6OFbzw8= github.com/tidwall/wal v1.1.8 h1:2qDSGdAdjaY3PEvHRva+9UFqgk+ef7cOiW1Qn5JH1y0= github.com/tidwall/wal v1.1.8/go.mod h1:r6lR1j27W9EPalgHiB7zLJDYu3mzW5BQP5KrzBpYY/E= +github.com/tilinna/clock v1.1.0 h1:6IQQQCo6KoBxVudv6gwtY8o4eDfhHo8ojA5dP0MfhSs= +github.com/tilinna/clock v1.1.0/go.mod h1:ZsP7BcY7sEEz7ktc0IVy8Us6boDrK8VradlKRUGfOao= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= diff --git a/collector/lambdacomponents/exporter/awss3.go b/collector/lambdacomponents/exporter/awss3.go new file mode 100644 index 0000000000..6da8aa97d5 --- /dev/null +++ b/collector/lambdacomponents/exporter/awss3.go @@ -0,0 +1,28 @@ +//go:build lambdacomponents.custom && (lambdacomponents.all || lambdacomponents.exporter.all || lambdacomponents.exporter.awss3) + +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package exporter + +import ( + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter" + "go.opentelemetry.io/collector/exporter" +) + +func init() { + Factories = append(Factories, func(extensionId string) exporter.Factory { + return awss3exporter.NewFactory() + }) +} diff --git a/collector/lambdacomponents/go.mod b/collector/lambdacomponents/go.mod index b251aa83b5..a25d9abe5e 100644 --- a/collector/lambdacomponents/go.mod +++ b/collector/lambdacomponents/go.mod @@ -4,6 +4,7 @@ go 1.23.1 require ( github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.119.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter v0.119.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.119.0 github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension v0.119.0 github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension v0.119.0 @@ -12,6 +13,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.119.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.119.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.119.0 + github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.119.0 github.com/open-telemetry/opentelemetry-lambda/collector/processor/coldstartprocessor v0.98.0 github.com/open-telemetry/opentelemetry-lambda/collector/processor/decoupleprocessor v0.0.0-00010101000000-000000000000 github.com/open-telemetry/opentelemetry-lambda/collector/receiver/telemetryapireceiver v0.98.0 @@ -37,14 +39,20 @@ require ( github.com/antchfx/xmlquery v1.4.3 // indirect github.com/antchfx/xpath v1.3.3 // indirect github.com/aws/aws-sdk-go-v2 v1.36.1 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.8 // indirect github.com/aws/aws-sdk-go-v2/config v1.29.6 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.17.59 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.28 // indirect + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.54 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.32 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.32 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.32 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.5.6 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.13 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.13 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.76.0 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.24.15 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.14 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.33.14 // indirect @@ -122,6 +130,7 @@ require ( github.com/tidwall/pretty v1.2.0 // indirect github.com/tidwall/tinylru v1.1.0 // indirect github.com/tidwall/wal v1.1.8 // indirect + github.com/tilinna/clock v1.1.0 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/ua-parser/uap-go v0.0.0-20240611065828-3a4781585db6 // indirect diff --git a/collector/lambdacomponents/go.sum b/collector/lambdacomponents/go.sum index 5011fec105..42eb44c701 100644 --- a/collector/lambdacomponents/go.sum +++ b/collector/lambdacomponents/go.sum @@ -12,22 +12,34 @@ github.com/antchfx/xpath v1.3.3 h1:tmuPQa1Uye0Ym1Zn65vxPgfltWb/Lxu2jeqIGteJSRs= github.com/antchfx/xpath v1.3.3/go.mod h1:i54GszH55fYfBmoZXapTHN8T8tkcHfRgLyVwwqzXNcs= github.com/aws/aws-sdk-go-v2 v1.36.1 h1:iTDl5U6oAhkNPba0e1t1hrwAo02ZMqbrGq4k5JBWM5E= github.com/aws/aws-sdk-go-v2 v1.36.1/go.mod h1:5PMILGVKiW32oDzjj6RU52yrNrDPUHcbZQYr1sM7qmM= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.8 h1:zAxi9p3wsZMIaVCdoiQp2uZ9k1LsZvmAnoTBeZPXom0= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.8/go.mod h1:3XkePX5dSaxveLAYY7nsbsZZrKxCyEuE5pM4ziFxyGg= github.com/aws/aws-sdk-go-v2/config v1.29.6 h1:fqgqEKK5HaZVWLQoLiC9Q+xDlSp+1LYidp6ybGE2OGg= github.com/aws/aws-sdk-go-v2/config v1.29.6/go.mod h1:Ft+WLODzDQmCTHDvqAH1JfC2xxbZ0MxpZAcJqmE1LTQ= github.com/aws/aws-sdk-go-v2/credentials v1.17.59 h1:9btwmrt//Q6JcSdgJOLI98sdr5p7tssS9yAsGe8aKP4= github.com/aws/aws-sdk-go-v2/credentials v1.17.59/go.mod h1:NM8fM6ovI3zak23UISdWidyZuI1ghNe2xjzUZAyT+08= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.28 h1:KwsodFKVQTlI5EyhRSugALzsV6mG/SGrdjlMXSZSdso= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.28/go.mod h1:EY3APf9MzygVhKuPXAc5H+MkGb8k/DOSQjWS0LgkKqI= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.54 h1:6BWOAho3Cgdy4cmNJ4HWY8VZgqODEU7Gw78XXireNZI= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.17.54/go.mod h1:n+t/oyYErOV3jf/GxNTVlizSM9RMV1yH7jvcIvld3Do= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.32 h1:BjUcr3X3K0wZPGFg2bxOWW3VPN8rkE3/61zhP+IHviA= github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.32/go.mod h1:80+OGC/bgzzFFTUmcuwD0lb4YutwQeKLFpmt6hoWapU= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.32 h1:m1GeXHVMJsRsUAqG6HjZWx9dj7F5TR+cF1bjyfYyBd4= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.32/go.mod h1:IitoQxGfaKdVLNg0hD8/DXmAqNy0H4K2H2Sf91ti8sI= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2 h1:Pg9URiobXy85kgFev3og2CuOZ8JZUBENF+dcgWBaYNk= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.32 h1:OIHj/nAhVzIXGzbAE+4XmZ8FPvro3THr6NlqErJc3wY= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.32/go.mod h1:LiBEsDo34OJXqdDlRGsilhlIiXR7DL+6Cx2f4p1EgzI= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2 h1:D4oz8/CzT9bAEYtVhSBmFj2dNOtaHOtMKc2vHBwYizA= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2/go.mod h1:Za3IHqTQ+yNcRHxu1OFucBh0ACZT4j4VQFF0BqpZcLY= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.5.6 h1:cCBJaT7EeEojpJ4s7wTDbhZlHVJOgNHN7iw6qVurGaw= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.5.6/go.mod h1:WYH1ABybY7JK9TITPnk6ZlP7gQB8psI4c9qDmMsnLSA= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.13 h1:SYVGSFQHlchIcy6e7x12bsrxClCXSP5et8cqVhL8cuw= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.13/go.mod h1:kizuDaLX37bG5WZaoxGPQR/LNFXpxp0vsUnqfkWXfNE= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.13 h1:OBsrtam3rk8NfBEq7OLOMm5HtQ9Yyw32X4UQMya/wjw= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.18.13/go.mod h1:3U4gFA5pmoCOja7aq4nSaIAGbaOHv2Yl2ug018cmC+Q= +github.com/aws/aws-sdk-go-v2/service/s3 v1.76.0 h1:ehvUZNVrGA1Usa6yYo8A8pUqrigRelWXSbcCqYpRLeI= +github.com/aws/aws-sdk-go-v2/service/s3 v1.76.0/go.mod h1:KuLNrwYJFaC2AVZ+CVVc12k9NyqwgWsoNNHjwqF6QNk= github.com/aws/aws-sdk-go-v2/service/sso v1.24.15 h1:/eE3DogBjYlvlbhd2ssWyeuovWunHLxfgw3s/OJa4GQ= github.com/aws/aws-sdk-go-v2/service/sso v1.24.15/go.mod h1:2PCJYpi7EKeA5SkStAmZlF6fi0uUABuhtF8ILHjGc3Y= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.14 h1:M/zwXiL2iXUrHputuXgmO94TVNmcenPHxgLXLutodKE= @@ -148,6 +160,8 @@ github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.119.0 h1:0eIwc699pvvChuyKDexhl3xovAQzc18xVOvxJ7tv9r8= github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.119.0/go.mod h1:Cmey/JEL25DSYfYNxSNpunKzuebMypjZs3VsNc4JSeU= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter v0.119.0 h1:0FAtPJ8yCZgMVRoKz1YjlaZhyOaV7QJWFDYpTVvMV2Y= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awss3exporter v0.119.0/go.mod h1:3wvrLx2DPLts6vLXG6u+GdC/yvn1lpSDfiwiDnQGzZI= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.119.0 h1:Uw2qT8XxWEp+0YSeBEQuRlXgnvam8B3IR+6Qu0xKvwg= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.119.0/go.mod h1:zaYmXAbN866u9Wj/YAxlY4p2/lyzlE554Ql/FgI3J5A= github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension v0.119.0 h1:zzNRPHTSmLGXMO5G7gwJ1QkNuIYBR1Q13ctbw/PWd5U= @@ -164,6 +178,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0. github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil v0.119.0/go.mod h1:Cx/iI+dXpsifBnU9Ch4hN1de5R8dvnyiQJecIc1ty7M= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/core/xidutils v0.119.0 h1:5F+Xa3A/xdlA9x2XdFEATeMhcU4R35TSIs3q6BynqCM= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/core/xidutils v0.119.0/go.mod h1:N6FGJBXj0QY/e9zjdlIWGCKHD+fKUwUtreAfAZRyoFA= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.119.0 h1:Nc1rvF/hxp8TwYOSsA2qmvIQlS+8lougZsyxcTN6U78= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden v0.119.0/go.mod h1:7ePS4L6s7UcWxxgIQkAiI5db/OxwRAV9+kziKVIO3Y8= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.119.0 h1:ql3Ujsfiwd1uKAJfK+EbUnLXz1NcStK2q5PRNBqJaQY= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.119.0/go.mod h1:Df15ipOX4JryZDCEiFhByJNgycMOoO6AP0XB/oeqtH4= github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.119.0 h1:2ztsxw6DH2CbXbykCGgPSZmHHRilNuD06VOfI/z9xGs= @@ -188,6 +204,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceproc github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.119.0/go.mod h1:acrmdOey6Ccj0jlgaHgWwRM9VmSfUaWdHm0H9Dz8GO4= github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.119.0 h1:HBQqRHsRIkJbG6iFHT8Q+TJPljwUSEd75wlqiHVtA5I= github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.119.0/go.mod h1:CEzAuqlTFNnxOUk8ix41TM1Bmembk+nKrhYzNN6r0NM= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.119.0 h1:8HlxU1CW9qRYBSp5LdJn904NhdXAuKsklQ8PGTbdiw8= +github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.119.0/go.mod h1:yRAFW+mmlDKUXAZ77h+EQ4s7z/RZaGK/YClpieva5aY= github.com/pierrec/lz4/v4 v4.1.22 h1:cKFw6uJDK+/gfw5BcDL0JL5aBsAFdsIT18eRtLj7VIU= github.com/pierrec/lz4/v4 v4.1.22/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= @@ -232,6 +250,8 @@ github.com/tidwall/tinylru v1.1.0 h1:XY6IUfzVTU9rpwdhKUF6nQdChgCdGjkMfLzbWyiau6I github.com/tidwall/tinylru v1.1.0/go.mod h1:3+bX+TJ2baOLMWTnlyNWHh4QMnFyARg2TLTQ6OFbzw8= github.com/tidwall/wal v1.1.8 h1:2qDSGdAdjaY3PEvHRva+9UFqgk+ef7cOiW1Qn5JH1y0= github.com/tidwall/wal v1.1.8/go.mod h1:r6lR1j27W9EPalgHiB7zLJDYu3mzW5BQP5KrzBpYY/E= +github.com/tilinna/clock v1.1.0 h1:6IQQQCo6KoBxVudv6gwtY8o4eDfhHo8ojA5dP0MfhSs= +github.com/tilinna/clock v1.1.0/go.mod h1:ZsP7BcY7sEEz7ktc0IVy8Us6boDrK8VradlKRUGfOao= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= diff --git a/collector/lambdacomponents/processor/transform.go b/collector/lambdacomponents/processor/transform.go new file mode 100644 index 0000000000..2ff488f67c --- /dev/null +++ b/collector/lambdacomponents/processor/transform.go @@ -0,0 +1,28 @@ +//go:build lambdacomponents.custom && (lambdacomponents.all || lambdacomponents.processor.all || lambdacomponents.processor.transform) + +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package processor + +import ( + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor" + "go.opentelemetry.io/collector/processor" +) + +func init() { + Factories = append(Factories, func(extensionId string) processor.Factory { + return transformprocessor.NewFactory() + }) +} diff --git a/devops/DownloadLayer.yml b/devops/DownloadLayer.yml new file mode 100644 index 0000000000..5a983a37cb --- /dev/null +++ b/devops/DownloadLayer.yml @@ -0,0 +1,27 @@ +parameters: + - name: skipBuild + type: string + default: "false" + - name: githubConnection + type: string + default: "Sage" + - name: defaultVersionType + type: string + default: "latest" + +jobs: + - job: DownloadOpenTelemetryLayer + displayName: "Download OpenTelemetry Layer" + condition: and(succeeded(), eq('${{ parameters.skipBuild }}', false)) + steps: + - task: DownloadGitHubRelease@0 + inputs: + connection: ${{ parameters.githubConnection }} + userRepository: Sage/opentelemetry-lambda + defaultVersionType: ${{ parameters.defaultVersionType }} + downloadPath: '$(System.ArtifactsDirectory)' + - task: PublishBuildArtifacts@1 + displayName: "Publish to build output" + inputs: + artifactName: "build_output" + PathtoPublish: "$(System.ArtifactsDirectory)" diff --git a/pull_request_template.md b/pull_request_template.md new file mode 100644 index 0000000000..33a6a8c26c --- /dev/null +++ b/pull_request_template.md @@ -0,0 +1,28 @@ + + + +# Description + + +## Types of changes + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] Refactor (code change that neither fixes a bug nor adds a feature) +- [ ] Hot fix (patch that fixes a bug in production) + +## How has this been tested? (optional) + + + +## Screenshots (if appropriate): + +## Checklist: + + +- [ ] My code follows the code style of this project. +- [ ] I have performed a self-review of my code +- [ ] I have added tests to cover my changes. +- [ ] I ran CI Tests and Unit tests locally prior to submission. +- [ ] I have updated the documentation accordingly to my changes. \ No newline at end of file