Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 67 additions & 39 deletions .github/workflows/release-layer-collector.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
6 changes: 5 additions & 1 deletion collector/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
14 changes: 12 additions & 2 deletions collector/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand All @@ -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=
Expand All @@ -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=
Expand Down Expand Up @@ -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=
Expand Down
28 changes: 28 additions & 0 deletions collector/lambdacomponents/exporter/awss3.go
Original file line number Diff line number Diff line change
@@ -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()
})
}
9 changes: 9 additions & 0 deletions collector/lambdacomponents/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading
Loading