Skip to content

Commit 94930a6

Browse files
authored
Merge branch 'main' into ruby-jit-upstream
2 parents e4d6d9a + 534ce0d commit 94930a6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2258
-616
lines changed

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ jobs:
2525
uses: ./.github/workflows/env
2626

2727
- name: Initialize CodeQL
28-
uses: github/codeql-action/init@c793b717bc78562f491db7b0e93a3a178b099162 # v4.32.5
28+
uses: github/codeql-action/init@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
2929
with:
3030
languages: go
3131

3232
- name: Build Artifact
3333
run: make
3434

3535
- name: Perform CodeQL Analysis
36-
uses: github/codeql-action/analyze@c793b717bc78562f491db7b0e93a3a178b099162 # v4.32.5
36+
uses: github/codeql-action/analyze@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
3737
with:
3838
category: "/language:Go"
3939
timeout-minutes: 10

.github/workflows/collector-tests.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
schedule:
55
# Run every day at 3:15 AM.
66
- cron: '15 3 * * *'
7+
pull_request:
8+
branches: ["**"]
9+
paths:
10+
- cmd/otelcol-ebpf-profiler/manifest.yaml
711

812
concurrency:
913
group: ${{ github.workflow }}-${{ github.ref_name }}
@@ -50,3 +54,39 @@ jobs:
5054
run: |
5155
go install go.opentelemetry.io/build-tools/issuegenerator@v0.28.1
5256
issuegenerator -path /tmp/testresults
57+
58+
otelcol-ebpf-profiler:
59+
strategy:
60+
matrix:
61+
include:
62+
- { runner: ubuntu-24.04, use-upstream: true }
63+
- { runner: ubuntu-24.04, use-upstream: false }
64+
- { runner: ubuntu-24.04-arm, use-upstream: true }
65+
- { runner: ubuntu-24.04-arm, use-upstream: false }
66+
runs-on: ${{ matrix.runner }}
67+
steps:
68+
- name: Checkout Repo
69+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
70+
- name: Set up Go Stable
71+
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
72+
with:
73+
go-version: stable
74+
- name: Clone Collector
75+
if: ${{ matrix.use-upstream }}
76+
run: |
77+
collector_path=/tmp/opentelemetry-collector
78+
git clone --depth=1 https://github.com/open-telemetry/opentelemetry-collector.git $collector_path
79+
- name: Setup replace statements
80+
if: ${{ matrix.use-upstream }}
81+
run: |
82+
COLLECTOR_PATH=/tmp/opentelemetry-collector make otel-from-tree
83+
- name: Build otelcol-ebpf-profiler
84+
run: |
85+
make otelcol-ebpf-profiler
86+
- name: Generate Issue
87+
if: failure()
88+
env:
89+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90+
run: |
91+
go install go.opentelemetry.io/build-tools/issuegenerator@v0.28.1
92+
issuegenerator -path /tmp/testresults

.github/workflows/ossf-scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ jobs:
4242
# Upload the results to GitHub's code scanning dashboard (optional).
4343
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
4444
- name: "Upload to code-scanning"
45-
uses: github/codeql-action/upload-sarif@c793b717bc78562f491db7b0e93a3a178b099162 # v4.32.5
45+
uses: github/codeql-action/upload-sarif@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
4646
with:
4747
sarif_file: results.sarif

.github/workflows/push-docker-image.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ jobs:
1818
- name: Checkout code
1919
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2020
- name: Login to Docker Hub
21-
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
21+
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
2222
with:
2323
username: ${{ secrets.DOCKER_USERNAME }}
2424
password: ${{ secrets.DOCKER_PASSWORD }}
2525
- name: Set up QEMU
26-
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
26+
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
2727
- name: Set up Docker Buildx
28-
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
28+
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
2929
- name: Set current timestamp tag
3030
id: tag
3131
run: |
3232
echo "tag=$(date +%Y%m%d%H%M)" >> $GITHUB_OUTPUT
3333
- name: Build and push
34-
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
34+
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
3535
with:
3636
push: true
3737
file: Dockerfile

.github/workflows/unit-test-on-pull-request.yml

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,6 @@ jobs:
6262
make format
6363
git diff --exit-code || (echo 'Code base is not Go or C formatted, please run "make format" and commit the changes in this PR.'; exit 1)
6464
65-
build-collector:
66-
name: Build OTel Collector (${{ matrix.target_arch }})
67-
runs-on: ${{ matrix.runner }}
68-
strategy:
69-
matrix:
70-
include:
71-
- { target_arch: amd64, runner: ubuntu-24.04 }
72-
- { target_arch: arm64, runner: ubuntu-24.04-arm }
73-
steps:
74-
- name: Clone code
75-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
76-
- name: Set up environment
77-
uses: ./.github/workflows/env
78-
- name: build
79-
run: make otelcol-ebpf-profiler
80-
8165
test:
8266
name: Test (${{ matrix.target_arch }}${{ matrix.go_flags }})
8367
runs-on: ${{ matrix.runner }}
@@ -196,7 +180,7 @@ jobs:
196180
go install github.com/florianl/bluebox@v0.0.1
197181
sudo mv ~/go/bin/bluebox /usr/local/bin/.
198182
- name: Fetch integration test binaries
199-
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
183+
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
200184
with: { name: "integration-test-binaries-${{ matrix.target_arch }}" }
201185
- name: Fetch precompiled kernel
202186
run: |

.golangci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ linters:
7979
- wastedassign
8080
- wsl
8181
- wrapcheck
82+
- prealloc # CI failure with golangci 2.10.1, worth fixing
8283
# we don't want to change code to Go 1.22+ yet
8384
- intrange
8485
- copyloopvar
@@ -87,7 +88,7 @@ linters:
8788
paths:
8889
- design-docs
8990
- doc
90-
- LICENSES
91+
- LICENSES
9192
- target
9293
- go
9394

Cargo.lock

Lines changed: 19 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/otelcol-ebpf-profiler/manifest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dist:
1414

1515
receivers:
1616
- gomod: go.opentelemetry.io/collector/receiver/otlpreceiver v0.147.0
17-
- gomod: go.opentelemetry.io/ebpf-profiler v0.0.202606
17+
- gomod: go.opentelemetry.io/ebpf-profiler v0.0.202610
1818
import: go.opentelemetry.io/ebpf-profiler/collector
1919

2020
exporters:

cmd/otelcol-ebpf-profiler/otel-from-tree.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
set -euo pipefail
44

5+
# Use COLLECTOR_PATH if set, otherwise default to ../../../opentelemetry-collector
6+
COLLECTOR_PATH="${COLLECTOR_PATH:-../../../opentelemetry-collector}"
7+
58
echo "Adding local opentelemetry-collector replaces to manifest.yaml"
9+
echo "Using collector path: $COLLECTOR_PATH"
610

711
if grep -q "# START otel-from-tree" cmd/otelcol-ebpf-profiler/manifest.yaml; then
812
echo "otel-from-tree already applied. Run 'make otel-from-lib' first to revert."
@@ -16,7 +20,7 @@ grep -E "gomod: go.opentelemetry.io/collector/" cmd/otelcol-ebpf-profiler/manife
1620
sort -u | \
1721
while read -r module; do
1822
subpath=${module#go.opentelemetry.io/collector}
19-
echo " - ${module} => ../opentelemetry-collector${subpath}" >> cmd/otelcol-ebpf-profiler/manifest.yaml
23+
echo " - ${module} => ${COLLECTOR_PATH}${subpath}" >> cmd/otelcol-ebpf-profiler/manifest.yaml
2024
done
2125

2226
echo "Local replaces added. You can now build with local opentelemetry-collector changes."

collector/factory_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright The OpenTelemetry Authors
22
// SPDX-License-Identifier: Apache-2.0
33

4-
//go:build linux
4+
//go:build linux && (amd64 || arm64)
55

66
package collector // import "go.opentelemetry.io/ebpf-profiler/collector"
77

0 commit comments

Comments
 (0)