Skip to content

Commit 4f096d8

Browse files
committed
add new ebpf-profiler distribution
1 parent ea781ec commit 4f096d8

File tree

11 files changed

+294
-15
lines changed

11 files changed

+294
-15
lines changed

.github/CODEOWNERS

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
#
77
# Learn about membership in OpenTelemetry community:
88
# https://github.com/open-telemetry/community/blob/main/community-membership.md
9-
#
109
#
11-
# Learn about CODEOWNERS file format:
10+
#
11+
# Learn about CODEOWNERS file format:
1212
# https://help.github.com/en/articles/about-code-owners
1313
#
1414

@@ -18,4 +18,4 @@
1818
/distributions/otelcol-otlp/manifest.yaml @open-telemetry/collector-releases-approvers @open-telemetry/collector-approvers
1919
/distributions/otelcol-contrib/manifest.yaml @open-telemetry/collector-releases-approvers @open-telemetry/collector-contrib-approvers
2020
/distributions/otelcol-k8s/manifest.yaml @open-telemetry/collector-releases-approvers @open-telemetry/helm-approvers @open-telemetry/operator-approvers
21-
21+
/distributions/otelcol-ebpf-profiler @open-telemetry/collector-releases-approvers @opentelemetry/ebpf-profiler-approvers
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI - eBPF Profiler - GoReleaser
2+
3+
on:
4+
merge_group:
5+
push:
6+
branches: [main]
7+
paths:
8+
- "distributions/otelcol-k8s/**"
9+
- "cmd/**"
10+
- ".github/**"
11+
- "scripts/**"
12+
- "Makefile"
13+
- "go.mod"
14+
- "go.sum"
15+
pull_request:
16+
branches: [main]
17+
paths:
18+
- "distributions/otelcol-ebpf-profiler/**"
19+
- "cmd/**"
20+
- ".github/**"
21+
- "scripts/**"
22+
- "Makefile"
23+
- "go.mod"
24+
- "go.sum"
25+
26+
jobs:
27+
check-goreleaser:
28+
name: CI - eBPF Profiler - GoReleaser
29+
uses: ./.github/workflows/base-ci-goreleaser.yaml
30+
with:
31+
distribution: otelcol-ebpf-profiler
32+
goos: '[ "linux" ]'
33+
goarch: '[ "amd64", "arm64", "ppc64le", "s390x" ]'
34+
secrets: inherit
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Release eBPF Profiler
2+
3+
on:
4+
push:
5+
tags: ["v*"]
6+
7+
jobs:
8+
release:
9+
name: Release eBPF Profiler
10+
uses: ./.github/workflows/base-release.yaml
11+
with:
12+
distribution: otelcol-ebpf-profiler
13+
goos: '[ "linux" ]'
14+
goarch: '[ "amd64", "arm64", "ppc64le", "s390x" ]'
15+
secrets: inherit
16+
permissions: write-all

.github/workflows/scripts/bump-versions.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22
set -e
33
# This script reads current versions and takes optional next versions, and updates the
4-
# version in the specified files. If next version is not provided, it will infer the
5-
# next semantic version (e.g. v0.110.0 -> v0.111.0 or v1.16.0 -> v1.17.0) based on the
4+
# version in the specified files. If next version is not provided, it will infer the
5+
# next semantic version (e.g. v0.110.0 -> v0.111.0 or v1.16.0 -> v1.17.0) based on the
66
# current version(s) read in.
77

88
# List of files to update
@@ -11,6 +11,7 @@ manifest_files=(
1111
"distributions/otelcol/manifest.yaml"
1212
"distributions/otelcol-k8s/manifest.yaml"
1313
"distributions/otelcol-otlp/manifest.yaml"
14+
"distributions/otelcol-ebpf-profiler/manifest.yaml"
1415
)
1516

1617
# Function to display usage
@@ -206,7 +207,7 @@ create_pr() {
206207

207208
gh pr create --title "[chore] Prepare release $next_version" \
208209
--body "This PR updates the version from $current_version to $next_version" \
209-
--base main --head "$branch_name" --draft
210+
--base main --head "$branch_name" --draft
210211
}
211212

212213
# TODO: Once Collector 1.0 is released, we can consider removing the

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ TOOLS_BIN_NAMES := $(addprefix $(TOOLS_BIN_DIR)/, $(notdir $(shell echo $(TOOLS_
1616
CHLOGGEN := $(TOOLS_BIN_DIR)/chloggen
1717
CHLOGGEN_CONFIG := .chloggen/config.yaml
1818

19-
DISTRIBUTIONS ?= "otelcol,otelcol-contrib,otelcol-k8s,otelcol-otlp"
19+
DISTRIBUTIONS ?= "otelcol,otelcol-contrib,otelcol-k8s,otelcol-otlp,otelcol-ebpf-profiler"
2020

2121
ci: check build
2222
check: ensure-goreleaser-up-to-date validate-components

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Current list of distributions:
1818
- [OpenTelemetry Collector Contrib (also known as "otelcol-contrib")](./distributions/otelcol-contrib)
1919
- [OpenTelemetry Collector for Kubernetes (also known as "otelcol-k8s")](./distributions/otelcol-k8s)
2020
- [OpenTelemetry Collector OTLP (also known as "otelcol-otlp")](./distributions/otelcol-otlp)
21+
- [OpenTelemetry Collector eBPF Profiler (also known as "otelcol-ebpf-profiler")](./distributions/otelcol-ebpf-profiler)
2122

2223
## Community
2324

cmd/goreleaser/internal/configure.go

+25-8
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,15 @@ import (
2929
)
3030

3131
const (
32-
armArch = "arm"
33-
coreDistro = "otelcol"
34-
contribDistro = "otelcol-contrib"
35-
k8sDistro = "otelcol-k8s"
36-
otlpDistro = "otelcol-otlp"
37-
ghcr = "ghcr.io/open-telemetry/opentelemetry-collector-releases"
38-
binaryNamePrefix = "otelcol"
39-
imageNamePrefix = "opentelemetry-collector"
32+
armArch = "arm"
33+
coreDistro = "otelcol"
34+
contribDistro = "otelcol-contrib"
35+
k8sDistro = "otelcol-k8s"
36+
otlpDistro = "otelcol-otlp"
37+
ebpfProfilerDistro = "otelcol-ebpf-profiler"
38+
ghcr = "ghcr.io/open-telemetry/opentelemetry-collector-releases"
39+
binaryNamePrefix = "otelcol"
40+
imageNamePrefix = "opentelemetry-collector"
4041
)
4142

4243
var (
@@ -45,6 +46,7 @@ var (
4546
winContainerArchs = []string{"amd64"}
4647
darwinArchs = []string{"amd64", "arm64"}
4748
k8sArchs = []string{"amd64", "arm64", "ppc64le", "s390x"}
49+
ebpfProfilerArchs = []string{"amd64", "arm64", "ppc64le", "s390x"}
4850

4951
imageRepos = []string{ghcr}
5052

@@ -141,6 +143,19 @@ var (
141143
newContainerImageManifests(d.name, "linux", k8sArchs, containerImageOptions{}),
142144
)
143145
}).WithDefaultArchives().WithDefaultChecksum().WithDefaultSigns().WithDefaultDockerSigns().WithDefaultSBOMs().Build()
146+
147+
// ebpf-profiler distro
148+
ebpfProfilerDist = newDistributionBuilder(ebpfProfilerDistro).WithConfigFunc(func(d *distribution) {
149+
d.buildConfigs = []buildConfig{
150+
&fullBuildConfig{targetOS: "linux", targetArch: ebpfProfilerArchs, ppc64Version: []string{"power8"}},
151+
}
152+
d.containerImages = slices.Concat(
153+
newContainerImages(d.name, "linux", ebpfProfilerArchs, containerImageOptions{armVersion: "7"}),
154+
)
155+
d.containerImageManifests = slices.Concat(
156+
newContainerImageManifests(d.name, "linux", ebpfProfilerArchs, containerImageOptions{}),
157+
)
158+
}).WithDefaultArchives().WithDefaultChecksum().WithDefaultSigns().WithDefaultDockerSigns().WithDefaultSBOMs().Build()
144159
)
145160

146161
type buildConfig interface {
@@ -595,6 +610,8 @@ func BuildDist(dist string, onlyBuild bool) config.Project {
595610
return otlpDist.BuildProject()
596611
case k8sDistro:
597612
return k8sDist.BuildProject()
613+
case ebpfProfilerDistro:
614+
return ebpfProfilerDist.BuildProject()
598615
case contribDistro:
599616
if onlyBuild {
600617
return contribBuildOnlyDist.BuildProject()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
version: 2
2+
project_name: opentelemetry-collector-releases
3+
env:
4+
- COSIGN_YES=true
5+
- LD_FLAGS=-s -w
6+
- CGO_ENABLED=0
7+
- BUILD_FLAGS=-trimpath
8+
release:
9+
replace_existing_artifacts: true
10+
builds:
11+
- id: otelcol-ebpf-profiler-linux
12+
goos:
13+
- linux
14+
goarch:
15+
- amd64
16+
- arm64
17+
- ppc64le
18+
- s390x
19+
goppc64:
20+
- power8
21+
dir: _build
22+
binary: otelcol-ebpf-profiler
23+
ldflags:
24+
- '{{ .Env.LD_FLAGS }}'
25+
flags:
26+
- '{{ .Env.BUILD_FLAGS }}'
27+
archives:
28+
- id: otelcol-ebpf-profiler
29+
builds:
30+
- otelcol-ebpf-profiler-linux
31+
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}'
32+
checksum:
33+
name_template: '{{ .ProjectName }}_otelcol-ebpf-profiler_checksums.txt'
34+
dockers:
35+
- goos: linux
36+
goarch: amd64
37+
dockerfile: Dockerfile
38+
image_templates:
39+
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:{{ .Version }}-amd64
40+
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:latest-amd64
41+
build_flag_templates:
42+
- --pull
43+
- --platform=linux/amd64
44+
- --label=org.opencontainers.image.created={{.Date}}
45+
- --label=org.opencontainers.image.name={{.ProjectName}}
46+
- --label=org.opencontainers.image.revision={{.FullCommit}}
47+
- --label=org.opencontainers.image.version={{.Version}}
48+
- --label=org.opencontainers.image.source={{.GitURL}}
49+
- --label=org.opencontainers.image.licenses=Apache-2.0
50+
use: buildx
51+
- goos: linux
52+
goarch: arm64
53+
dockerfile: Dockerfile
54+
image_templates:
55+
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:{{ .Version }}-arm64
56+
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:latest-arm64
57+
build_flag_templates:
58+
- --pull
59+
- --platform=linux/arm64
60+
- --label=org.opencontainers.image.created={{.Date}}
61+
- --label=org.opencontainers.image.name={{.ProjectName}}
62+
- --label=org.opencontainers.image.revision={{.FullCommit}}
63+
- --label=org.opencontainers.image.version={{.Version}}
64+
- --label=org.opencontainers.image.source={{.GitURL}}
65+
- --label=org.opencontainers.image.licenses=Apache-2.0
66+
use: buildx
67+
- goos: linux
68+
goarch: ppc64le
69+
dockerfile: Dockerfile
70+
image_templates:
71+
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:{{ .Version }}-ppc64le
72+
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:latest-ppc64le
73+
build_flag_templates:
74+
- --pull
75+
- --platform=linux/ppc64le
76+
- --label=org.opencontainers.image.created={{.Date}}
77+
- --label=org.opencontainers.image.name={{.ProjectName}}
78+
- --label=org.opencontainers.image.revision={{.FullCommit}}
79+
- --label=org.opencontainers.image.version={{.Version}}
80+
- --label=org.opencontainers.image.source={{.GitURL}}
81+
- --label=org.opencontainers.image.licenses=Apache-2.0
82+
use: buildx
83+
- goos: linux
84+
goarch: s390x
85+
dockerfile: Dockerfile
86+
image_templates:
87+
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:{{ .Version }}-s390x
88+
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:latest-s390x
89+
build_flag_templates:
90+
- --pull
91+
- --platform=linux/s390x
92+
- --label=org.opencontainers.image.created={{.Date}}
93+
- --label=org.opencontainers.image.name={{.ProjectName}}
94+
- --label=org.opencontainers.image.revision={{.FullCommit}}
95+
- --label=org.opencontainers.image.version={{.Version}}
96+
- --label=org.opencontainers.image.source={{.GitURL}}
97+
- --label=org.opencontainers.image.licenses=Apache-2.0
98+
use: buildx
99+
docker_manifests:
100+
- name_template: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:{{ .Version }}
101+
image_templates:
102+
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:{{ .Version }}-amd64
103+
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:{{ .Version }}-arm64
104+
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:{{ .Version }}-ppc64le
105+
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:{{ .Version }}-s390x
106+
- name_template: ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:latest
107+
image_templates:
108+
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:latest-amd64
109+
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:latest-arm64
110+
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:latest-ppc64le
111+
- ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-ebpf-profiler:latest-s390x
112+
signs:
113+
- cmd: cosign
114+
args:
115+
- sign-blob
116+
- --output-signature
117+
- ${artifact}.sig
118+
- --output-certificate
119+
- ${artifact}.pem
120+
- ${artifact}
121+
signature: ${artifact}.sig
122+
artifacts: all
123+
certificate: ${artifact}.pem
124+
docker_signs:
125+
- args:
126+
- sign
127+
- ${artifact}
128+
artifacts: all
129+
sboms:
130+
- id: archive
131+
artifacts: archive
132+
- id: package
133+
artifacts: package
134+
monorepo:
135+
tag_prefix: v
136+
partial:
137+
by: target
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM alpine:3.21 as certs
2+
RUN apk --update add ca-certificates
3+
4+
FROM scratch
5+
6+
ARG USER_UID=10001
7+
ARG USER_GID=10001
8+
USER ${USER_UID}:${USER_GID}
9+
10+
COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
11+
COPY --chmod=755 otelcol-ebpf-profiler /otelcol-ebpf-profiler
12+
ENTRYPOINT ["/otelcol-ebpf-profiler"]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# OpenTelemetry Collector eBPF Profiling Distribution
2+
3+
This distribution is made specifically to be used as a node agent to gather
4+
profiles on all processes running on the system.
5+
6+
It contains the [eBPF profiler
7+
receiver](https://github.com/open-telemetry/opentelemetry-ebpf-profiler) as
8+
well as a subset of components from [OpenTelemetry Collector
9+
Core](https://github.com/open-telemetry/opentelemetry-collector) and
10+
[OpenTelemetry Collector
11+
Contrib](https://github.com/open-telemetry/opentelemetry-collector-contrib).
12+
13+
## Components
14+
15+
The full list of components is available in the [manifest](manifest.yaml).
16+
17+
### Rules for Component Inclusion
18+
19+
- Only includes components from Contrib and Core.
20+
- Only components that are Alpha or higher.
21+
- All receivers must facilitate the collection and processing of data that is generated by the eBPF profiler.
22+
- All components must be vendor-neutral.
23+
- Only exporters that use OTLP are allowed.
24+
- To facilitate troubleshooting, the nop, debug, and file exporters are exceptions.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
dist:
2+
module: github.com/open-telemetry/opentelemetry-collector-releases/ebpf-profiler
3+
name: otelcol-ebpf-profiler
4+
description: OpenTelemetry Collector for eBPF Profiling
5+
version: 0.123.1
6+
output_path: ./_build
7+
8+
exporters:
9+
- gomod: go.opentelemetry.io/collector/exporter/debugexporter v0.123.0
10+
- gomod: go.opentelemetry.io/collector/exporter/nopexporter v0.123.0
11+
- gomod: go.opentelemetry.io/collector/exporter/otlpexporter v0.123.0
12+
- gomod: go.opentelemetry.io/collector/exporter/otlphttpexporter v0.123.0
13+
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.123.0
14+
15+
processors:
16+
- gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.123.0
17+
- gomod: go.opentelemetry.io/collector/processor/memorylimiterprocessor v0.123.0
18+
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor v0.123.0
19+
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.123.0
20+
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.123.0
21+
22+
receivers:
23+
- gomod: go.opentelemetry.io/ebpf-profiler v0.0.0-20250408174414-ead430a15d49
24+
import: go.opentelemetry.io/ebpf-profiler/collector
25+
name: profilesreceiver
26+
27+
providers:
28+
- gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v1.29.0
29+
- gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v1.29.0
30+
- gomod: go.opentelemetry.io/collector/confmap/provider/httpprovider v1.29.0
31+
- gomod: go.opentelemetry.io/collector/confmap/provider/httpsprovider v1.29.0
32+
- gomod: go.opentelemetry.io/collector/confmap/provider/yamlprovider v1.29.0
33+
34+
# When adding a replace, add a comment before it to document why it's needed and when it can be removed
35+
replaces:
36+
# see https://github.com/openshift/api/pull/1515
37+
- github.com/openshift/api => github.com/openshift/api v0.0.0-20230726162818-81f778f3b3ec

0 commit comments

Comments
 (0)