From 9da60a13647dd2f838f73f99546b8d15a8245d2c Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Wed, 10 Apr 2024 08:58:01 +0200 Subject: [PATCH 1/4] feat(exporters): fluentforward Signed-off-by: Szilard Parrag --- distributions/otelcol-contrib/manifest.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/distributions/otelcol-contrib/manifest.yaml b/distributions/otelcol-contrib/manifest.yaml index 3eeb7e37..c511c07d 100644 --- a/distributions/otelcol-contrib/manifest.yaml +++ b/distributions/otelcol-contrib/manifest.yaml @@ -79,6 +79,7 @@ exporters: - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/syslogexporter v0.97.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter v0.97.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/exporter/zipkinexporter v0.97.0 + - gomod: github.com/axoflow/fluentforwardexporter v0.0.2 processors: - gomod: go.opentelemetry.io/collector/processor/batchprocessor v0.97.0 From 795d65823dc4bdb02ba4aab61dbc8242dbddea31 Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Wed, 27 Mar 2024 16:28:33 +0100 Subject: [PATCH 2/4] chore(renaming): rename it axoflow-otel-collector Signed-off-by: Szilard Parrag --- .github/workflows/ci-goreleaser.yaml | 6 ++---- .goreleaser.yaml | 20 +++++++++---------- Makefile | 4 ++-- cmd/goreleaser/internal/configure.go | 4 ++-- ...ntrib.yaml => axoflow-otel-collector.yaml} | 0 .../axoflow-otel-collector/Dockerfile | 14 +++++++++++++ .../README.md | 0 .../manifest.yaml | 6 +++--- .../otelcol-contrib.conf | 5 +++++ .../otelcol-contrib.service | 15 ++++++++++++++ .../postinstall.sh | 6 +++--- .../preinstall.sh | 2 +- .../preremove.sh | 4 ++-- distributions/otelcol-contrib/Dockerfile | 14 ------------- .../otelcol-contrib/otelcol-contrib.conf | 5 ----- .../otelcol-contrib/otelcol-contrib.service | 15 -------------- 16 files changed, 59 insertions(+), 61 deletions(-) rename configs/{otelcol-contrib.yaml => axoflow-otel-collector.yaml} (100%) create mode 100644 distributions/axoflow-otel-collector/Dockerfile rename distributions/{otelcol-contrib => axoflow-otel-collector}/README.md (100%) rename distributions/{otelcol-contrib => axoflow-otel-collector}/manifest.yaml (99%) create mode 100644 distributions/axoflow-otel-collector/otelcol-contrib.conf create mode 100644 distributions/axoflow-otel-collector/otelcol-contrib.service rename distributions/{otelcol-contrib => axoflow-otel-collector}/postinstall.sh (79%) rename distributions/{otelcol-contrib => axoflow-otel-collector}/preinstall.sh (80%) rename distributions/{otelcol-contrib => axoflow-otel-collector}/preremove.sh (86%) delete mode 100644 distributions/otelcol-contrib/Dockerfile delete mode 100644 distributions/otelcol-contrib/otelcol-contrib.conf delete mode 100644 distributions/otelcol-contrib/otelcol-contrib.service diff --git a/.github/workflows/ci-goreleaser.yaml b/.github/workflows/ci-goreleaser.yaml index e31c4b99..27402bfa 100644 --- a/.github/workflows/ci-goreleaser.yaml +++ b/.github/workflows/ci-goreleaser.yaml @@ -5,14 +5,12 @@ on: branches: [main] paths: - ".goreleaser.yaml" - - "distributions/otelcol/manifest.yaml" - - "distributions/otelcol-contrib/manifest.yaml" + - "distributions/axoflow-otel-collector/manifest.yaml" pull_request: branches: [main] paths: - ".goreleaser.yaml" - - "distributions/otelcol/manifest.yaml" - - "distributions/otelcol-contrib/manifest.yaml" + - "distributions/axoflow-otel-collector/manifest.yaml" jobs: check-goreleaser: diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 3854a125..a678da4c 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,13 +1,13 @@ -project_name: opentelemetry-collector-releases +project_name: axoflow-otel-collector-releases builds: - - id: otelcol-contrib + - id: axoflow-otel-collector goos: - linux goarch: - amd64 - arm64 - dir: distributions/otelcol-contrib/_build - binary: otelcol-contrib + dir: distributions/axoflow-otel-collector/_build + binary: axoflow-otel-collector ldflags: - -s - -w @@ -16,21 +16,21 @@ builds: env: - CGO_ENABLED=0 archives: - - id: otelcol-contrib + - id: axoflow-otel-collector builds: - - otelcol-contrib + - axoflow-otel-collector name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}' checksum: name_template: '{{ .ProjectName }}_checksums.txt' dockers: - goos: linux goarch: amd64 - dockerfile: distributions/otelcol-contrib/Dockerfile + dockerfile: distributions/axoflow-otel-collector/Dockerfile image_templates: - ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:{{ .Version }}-amd64 - ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:latest-amd64 extra_files: - - configs/otelcol-contrib.yaml + - configs/axoflow-otel-collector.yaml build_flag_templates: - --pull - --platform=linux/amd64 @@ -42,12 +42,12 @@ dockers: use: buildx - goos: linux goarch: arm64 - dockerfile: distributions/otelcol-contrib/Dockerfile + dockerfile: distributions/axoflow-otel-collector/Dockerfile image_templates: - ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:{{ .Version }}-arm64 - ghcr.io/axoflow/axoflow-otel-collector/axoflow-otel-collector:latest-arm64 extra_files: - - configs/otelcol-contrib.yaml + - configs/axoflow-otel-collector.yaml build_flag_templates: - --pull - --platform=linux/arm64 diff --git a/Makefile b/Makefile index e90f3995..6296cc79 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ OTELCOL_BUILDER_VERSION ?= 0.97.0 OTELCOL_BUILDER_DIR ?= ${HOME}/bin OTELCOL_BUILDER ?= ${OTELCOL_BUILDER_DIR}/ocb -DISTRIBUTIONS ?= "otelcol-contrib" +DISTRIBUTIONS ?= "axoflow-otel-collector" ci: check build check: ensure-goreleaser-up-to-date @@ -64,7 +64,7 @@ goreleaser: fi \ } -REMOTE?=git@github.com:axoflow/opentelemetry-collector-releases.git +REMOTE?=git@github.com:axoflow/axoflow-otel-collector-releases.git .PHONY: push-tags push-tags: @[ "${TAG}" ] || ( echo ">> env var TAG is not set"; exit 1 ) diff --git a/cmd/goreleaser/internal/configure.go b/cmd/goreleaser/internal/configure.go index c261d145..44bcb210 100644 --- a/cmd/goreleaser/internal/configure.go +++ b/cmd/goreleaser/internal/configure.go @@ -38,7 +38,7 @@ var ( func Generate(imagePrefixes []string, dists []string) config.Project { return config.Project{ - ProjectName: "opentelemetry-collector-releases", + ProjectName: "axoflow-otel-collector-releases", Checksum: config.Checksum{ NameTemplate: "{{ .ProjectName }}_checksums.txt", }, @@ -233,7 +233,7 @@ func DockerManifest(prefix, version, dist string) config.DockerManifest { // imageName translates a distribution name to a container image name. func imageName(dist string) string { - return strings.Replace(dist, "otelcol", "opentelemetry-collector", 1) + return strings.Replace(dist, "otelcol", "axoflow-otel-collector", 1) } // archName translates architecture to docker platform names. diff --git a/configs/otelcol-contrib.yaml b/configs/axoflow-otel-collector.yaml similarity index 100% rename from configs/otelcol-contrib.yaml rename to configs/axoflow-otel-collector.yaml diff --git a/distributions/axoflow-otel-collector/Dockerfile b/distributions/axoflow-otel-collector/Dockerfile new file mode 100644 index 00000000..c81352f1 --- /dev/null +++ b/distributions/axoflow-otel-collector/Dockerfile @@ -0,0 +1,14 @@ +FROM alpine:3.16 as certs +RUN apk --update add ca-certificates + +FROM scratch + +ARG USER_UID=10001 +USER ${USER_UID} + +COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt +COPY --chmod=755 axoflow-otel-collector /axoflow-otel-collector +COPY configs/axoflow-otel-collector.yaml /etc/axoflow-otel-collector/config.yaml +ENTRYPOINT ["/axoflow-otel-collector"] +CMD ["--config", "/etc/axoflow-otel-collector/config.yaml"] +EXPOSE 4317 55678 55679 diff --git a/distributions/otelcol-contrib/README.md b/distributions/axoflow-otel-collector/README.md similarity index 100% rename from distributions/otelcol-contrib/README.md rename to distributions/axoflow-otel-collector/README.md diff --git a/distributions/otelcol-contrib/manifest.yaml b/distributions/axoflow-otel-collector/manifest.yaml similarity index 99% rename from distributions/otelcol-contrib/manifest.yaml rename to distributions/axoflow-otel-collector/manifest.yaml index c511c07d..6b088611 100644 --- a/distributions/otelcol-contrib/manifest.yaml +++ b/distributions/axoflow-otel-collector/manifest.yaml @@ -1,7 +1,7 @@ dist: - module: github.com/open-telemetry/opentelemetry-collector-releases/contrib - name: otelcol-contrib - description: OpenTelemetry Collector Contrib + module: github.com/axoflow/axoflow-otel-collector-releases + name: axoflow-otel-collector + description: Axoflow Distribution for OpenTelemetry Collector version: 0.97.0 output_path: ./_build otelcol_version: 0.97.0 diff --git a/distributions/axoflow-otel-collector/otelcol-contrib.conf b/distributions/axoflow-otel-collector/otelcol-contrib.conf new file mode 100644 index 00000000..7613d53b --- /dev/null +++ b/distributions/axoflow-otel-collector/otelcol-contrib.conf @@ -0,0 +1,5 @@ +# Systemd environment file for the axoflow-otel-collector service + +# Command-line options for the axoflow-otel-collector service. +# Run `/usr/bin/axoflow-otel-collector --help` to see all available options. +OTELCOL_OPTIONS="--config=/etc/axoflow-otel-collector/config.yaml" diff --git a/distributions/axoflow-otel-collector/otelcol-contrib.service b/distributions/axoflow-otel-collector/otelcol-contrib.service new file mode 100644 index 00000000..0770b4c0 --- /dev/null +++ b/distributions/axoflow-otel-collector/otelcol-contrib.service @@ -0,0 +1,15 @@ +[Unit] +Description=OpenTelemetry Collector Contrib +After=network.target + +[Service] +EnvironmentFile=/etc/axoflow-otel-collector/axoflow-otel-collector.conf +ExecStart=/usr/bin/axoflow-otel-collector $OTELCOL_OPTIONS +KillMode=mixed +Restart=on-failure +Type=simple +User=axoflow-otel-collector +Group=axoflow-otel-collector + +[Install] +WantedBy=multi-user.target diff --git a/distributions/otelcol-contrib/postinstall.sh b/distributions/axoflow-otel-collector/postinstall.sh similarity index 79% rename from distributions/otelcol-contrib/postinstall.sh rename to distributions/axoflow-otel-collector/postinstall.sh index 3ec790ba..41ffb7f8 100755 --- a/distributions/otelcol-contrib/postinstall.sh +++ b/distributions/axoflow-otel-collector/postinstall.sh @@ -15,8 +15,8 @@ # limitations under the License. if command -v systemctl >/dev/null 2>&1; then - systemctl enable otelcol-contrib.service - if [ -f /etc/otelcol-contrib/config.yaml ]; then - systemctl start otelcol-contrib.service + systemctl enable axoflow-otel-collector.service + if [ -f /etc/axoflow-otel-collector/config.yaml ]; then + systemctl start axoflow-otel-collector.service fi fi diff --git a/distributions/otelcol-contrib/preinstall.sh b/distributions/axoflow-otel-collector/preinstall.sh similarity index 80% rename from distributions/otelcol-contrib/preinstall.sh rename to distributions/axoflow-otel-collector/preinstall.sh index 8737cae6..9a26be35 100755 --- a/distributions/otelcol-contrib/preinstall.sh +++ b/distributions/axoflow-otel-collector/preinstall.sh @@ -14,4 +14,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -getent passwd otelcol-contrib >/dev/null || useradd --system --user-group --no-create-home --shell /sbin/nologin otelcol-contrib +getent passwd axoflow-otel-collector >/dev/null || useradd --system --user-group --no-create-home --shell /sbin/nologin axoflow-otel-collector diff --git a/distributions/otelcol-contrib/preremove.sh b/distributions/axoflow-otel-collector/preremove.sh similarity index 86% rename from distributions/otelcol-contrib/preremove.sh rename to distributions/axoflow-otel-collector/preremove.sh index 5739d608..e3ab9136 100755 --- a/distributions/otelcol-contrib/preremove.sh +++ b/distributions/axoflow-otel-collector/preremove.sh @@ -15,6 +15,6 @@ # limitations under the License. if command -v systemctl >/dev/null 2>&1; then - systemctl stop otelcol-contrib.service - systemctl disable otelcol-contrib.service + systemctl stop axoflow-otel-collector.service + systemctl disable axoflow-otel-collector.service fi diff --git a/distributions/otelcol-contrib/Dockerfile b/distributions/otelcol-contrib/Dockerfile deleted file mode 100644 index aeb90975..00000000 --- a/distributions/otelcol-contrib/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM alpine:3.16 as certs -RUN apk --update add ca-certificates - -FROM scratch - -ARG USER_UID=10001 -USER ${USER_UID} - -COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt -COPY --chmod=755 otelcol-contrib /otelcol-contrib -COPY configs/otelcol-contrib.yaml /etc/otelcol-contrib/config.yaml -ENTRYPOINT ["/otelcol-contrib"] -CMD ["--config", "/etc/otelcol-contrib/config.yaml"] -EXPOSE 4317 55678 55679 diff --git a/distributions/otelcol-contrib/otelcol-contrib.conf b/distributions/otelcol-contrib/otelcol-contrib.conf deleted file mode 100644 index 29c245b2..00000000 --- a/distributions/otelcol-contrib/otelcol-contrib.conf +++ /dev/null @@ -1,5 +0,0 @@ -# Systemd environment file for the otelcol-contrib service - -# Command-line options for the otelcol-contrib service. -# Run `/usr/bin/otelcol-contrib --help` to see all available options. -OTELCOL_OPTIONS="--config=/etc/otelcol-contrib/config.yaml" diff --git a/distributions/otelcol-contrib/otelcol-contrib.service b/distributions/otelcol-contrib/otelcol-contrib.service deleted file mode 100644 index 453a5713..00000000 --- a/distributions/otelcol-contrib/otelcol-contrib.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=OpenTelemetry Collector Contrib -After=network.target - -[Service] -EnvironmentFile=/etc/otelcol-contrib/otelcol-contrib.conf -ExecStart=/usr/bin/otelcol-contrib $OTELCOL_OPTIONS -KillMode=mixed -Restart=on-failure -Type=simple -User=otelcol-contrib -Group=otelcol-contrib - -[Install] -WantedBy=multi-user.target From 5e6c00fc45d1c24c63b477fe9f5533aa58473a4f Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Fri, 19 Apr 2024 09:24:49 +0200 Subject: [PATCH 3/4] disable fluent receiver Signed-off-by: Szilard Parrag --- distributions/axoflow-otel-collector/manifest.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/distributions/axoflow-otel-collector/manifest.yaml b/distributions/axoflow-otel-collector/manifest.yaml index 6b088611..ee2b99f1 100644 --- a/distributions/axoflow-otel-collector/manifest.yaml +++ b/distributions/axoflow-otel-collector/manifest.yaml @@ -134,7 +134,7 @@ receivers: - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiver v0.97.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filestatsreceiver v0.97.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/flinkmetricsreceiver v0.97.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.97.0 +# - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/fluentforwardreceiver v0.97.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudpubsubreceiver v0.97.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver v0.97.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/haproxyreceiver v0.97.0 @@ -213,3 +213,4 @@ replaces: - github.com/mattn/go-ieproxy => github.com/mattn/go-ieproxy v0.0.1 # see https://github.com/openshift/api/pull/1515 - github.com/openshift/api => github.com/openshift/api v0.0.0-20230726162818-81f778f3b3ec + - github.com/IBM/fluent-forward-go => github.com/IBM/fluent-forward-go v0.2.3-0.20240418091724-720f8df4306a From 7d1d6cb3abd91d15ee090e5b7c2b9dee70515ccb Mon Sep 17 00:00:00 2001 From: Szilard Parrag Date: Tue, 23 Apr 2024 15:28:15 +0200 Subject: [PATCH 4/4] hotfix(build): disable components that had build problems > host.GetExporters undefined (type component.Host has no field or method GetExporters) Signed-off-by: Szilard Parrag --- distributions/axoflow-otel-collector/manifest.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/distributions/axoflow-otel-collector/manifest.yaml b/distributions/axoflow-otel-collector/manifest.yaml index ee2b99f1..fea5e5e8 100644 --- a/distributions/axoflow-otel-collector/manifest.yaml +++ b/distributions/axoflow-otel-collector/manifest.yaml @@ -98,7 +98,8 @@ processors: - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/remotetapprocessor v0.97.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.97.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.97.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.97.0 + # TODO: check if can be reenabled + # - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.97.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.97.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/sumologicprocessor v0.97.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.97.0 @@ -145,7 +146,8 @@ receivers: - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.97.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver v0.97.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/journaldreceiver v0.97.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver v0.97.0 + # TODO: check if can be reenabled + # - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver v0.97.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8seventsreceiver v0.97.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sobjectsreceiver v0.97.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkametricsreceiver v0.97.0 @@ -200,7 +202,8 @@ connectors: - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/countconnector v0.97.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/datadogconnector v0.97.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/routingconnector v0.97.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector v0.97.0 + # TODO: check if can be reenabled + # - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector v0.97.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector v0.97.0 # When adding a replace, add a comment before it to document why it's needed and when it can be removed