git: 3b21cf2cc771 - main - net/otelcol-contrib: add new port

From: Sergey A. Osokin <osa_at_FreeBSD.org>
Date: Sun, 02 Nov 2025 00:36:29 UTC
The branch main has been updated by osa:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3b21cf2cc771eac1f648d26372cafa97ae7db61b

commit 3b21cf2cc771eac1f648d26372cafa97ae7db61b
Author:     Sergey A. Osokin <osa@FreeBSD.org>
AuthorDate: 2025-11-02 00:24:50 +0000
Commit:     Sergey A. Osokin <osa@FreeBSD.org>
CommitDate: 2025-11-02 00:36:22 +0000

    net/otelcol-contrib: add new port
    
    This is the OpenTelemetry Collector components that are not suitable
    for the core repository of the collector, i.e. Contrib version.
    
    Sponsored by:   tipi.work
---
 net/Makefile                          |  1 +
 net/otelcol-contrib/Makefile          | 30 +++++++++++++++++++++++++
 net/otelcol-contrib/distinfo          |  3 +++
 net/otelcol-contrib/files/config.yaml | 41 +++++++++++++++++++++++++++++++++++
 net/otelcol-contrib/pkg-descr         | 10 +++++++++
 5 files changed, 85 insertions(+)

diff --git a/net/Makefile b/net/Makefile
index 6dd01d26c59b..75530a72bbf8 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -591,6 +591,7 @@
     SUBDIR += openvswitch
     SUBDIR += ortp
     SUBDIR += osrtspproxy
+    SUBDIR += otelcol-contrib
     SUBDIR += ovhcloud-cli
     SUBDIR += owamp
     SUBDIR += p5-Acme-HTTP
diff --git a/net/otelcol-contrib/Makefile b/net/otelcol-contrib/Makefile
new file mode 100644
index 000000000000..67c935ed3dee
--- /dev/null
+++ b/net/otelcol-contrib/Makefile
@@ -0,0 +1,30 @@
+PORTNAME=	otelcol-contrib
+PORTVERSION=	0.138.0
+CATEGORIES=	net
+MASTER_SITES=	https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v${PORTVERSION}/
+DISTFILES_amd64=	${PORTNAME}_${DISTVERSION}_linux_amd64.tar.gz
+
+MAINTAINER=	osa@FreeBSD.org
+COMMENT=	OpenTelemetry Collector Contrib
+WWW=		https://github.com/open-telemetry/opentelemetry-collector-contrib/
+
+LICENSE=	APACHE20
+
+ONLY_FOR_ARCHS=	amd64
+
+USES=		linux:rl9
+
+NO_BUILD=	yes
+NO_WRKSUBDIR=	yes
+
+PLIST_FILES=	bin/otelcol-contrib \
+		%%DATADIR%%/README.md \
+		%%DATADIR%%/config.yaml
+
+do-install:
+	${INSTALL_SCRIPT} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
+	@${MKDIR} ${STAGEDIR}${DATADIR}
+	${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DATADIR}
+	${INSTALL_DATA} ${FILESDIR}/config.yaml ${STAGEDIR}${DATADIR}
+
+.include <bsd.port.mk>
diff --git a/net/otelcol-contrib/distinfo b/net/otelcol-contrib/distinfo
new file mode 100644
index 000000000000..d2bee0c25c83
--- /dev/null
+++ b/net/otelcol-contrib/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1762041872
+SHA256 (otelcol-contrib_0.138.0_linux_amd64.tar.gz) = 9f6462ffa45829bce9e69a2995932a521e9d40f0658eddbe27f6e262c2e82b1d
+SIZE (otelcol-contrib_0.138.0_linux_amd64.tar.gz) = 90395268
diff --git a/net/otelcol-contrib/files/config.yaml b/net/otelcol-contrib/files/config.yaml
new file mode 100644
index 000000000000..15e658cdc508
--- /dev/null
+++ b/net/otelcol-contrib/files/config.yaml
@@ -0,0 +1,41 @@
+receivers:
+  nginx:
+     endpoint: "http://127.0.0.1:8080/status"
+     collection_interval: 10s
+  otlp:
+    protocols:
+      grpc:
+        endpoint: 0.0.0.0:4317
+
+exporters:
+  prometheus:
+    endpoint: 0.0.0.0:8889
+    namespace: default
+
+  debug:
+    verbosity: detailed
+
+processors:
+  batch:
+
+extensions:
+  health_check:
+    endpoint: 0.0.0.0:13133
+  pprof:
+    endpoint: 0.0.0.0:1777
+  zpages:
+    endpoint: 0.0.0.0:55679
+
+service:
+  extensions: [health_check, pprof, zpages]
+
+  pipelines:
+    metrics:
+      receivers: [nginx]
+      processors: [batch]
+      exporters: [prometheus]
+
+    traces:
+      receivers: [otlp]
+      processors: [batch]
+      exporters: [debug]
diff --git a/net/otelcol-contrib/pkg-descr b/net/otelcol-contrib/pkg-descr
new file mode 100644
index 000000000000..75782a993a40
--- /dev/null
+++ b/net/otelcol-contrib/pkg-descr
@@ -0,0 +1,10 @@
+The OpenTelemetry Collector components that are not suitable
+for the core repository of the collector.
+
+This distribution contains all the components from both the
+OpenTelemetry Collector,
+https://github.com/open-telemetry/opentelemetry-collector
+repository and the OpenTelemetry Collector Contrib,
+https://github.com/open-telemetry/opentelemetry-collector-contrib
+repository.  This distribution includes open source and
+vendor supported components.