Skip to content
Merged
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
6 changes: 6 additions & 0 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,9 @@ jobs:
# the cacheless retry, so any future non-cache flag is applied to both.
# CACHE holds only the cache-specific flags.
COMMON=()
if [ "${{ matrix.subtree.id }}" = "byoo-otel-collector" ]; then
COMMON+=(--jobs=1)
fi
CACHE=(--remote_cache=)
if [ "${CACHE_READY:-0}" = "1" ]; then
CACHE=(--remote_cache="$CACHE_ENDPOINT"
Expand Down Expand Up @@ -589,6 +592,9 @@ jobs:
# They still compile in the build step; only their execution is
# deferred to that lane (see the bazel-integration job).
COMMON=(--flaky_test_attempts=3 --test_tag_filters=-requires-docker)
if [ "${{ matrix.subtree.id }}" = "byoo-otel-collector" ]; then
COMMON+=(--jobs=1)
fi
CACHE=(--remote_cache=)
if [ "${CACHE_READY:-0}" = "1" ]; then
CACHE=(--remote_cache="$CACHE_ENDPOINT"
Expand Down
152 changes: 152 additions & 0 deletions .github/workflows/byoo-otel-collector.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# SPDX-FileCopyrightText: Copyright (c) NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

name: byoo-otel-collector

on:
push:
branches: [main]
pull_request:
branches: [main]
merge_group:
types: [checks_requested]
workflow_dispatch:

permissions:
contents: read

defaults:
run:
shell: bash

concurrency:
group: byoo-otel-collector-${{ github.ref }}
cancel-in-progress: true

jobs:
detect:
name: detect BYOO OTel collector changes
runs-on: ubuntu-latest
outputs:
changed: ${{ steps.detect.outputs.changed }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Detect changes
id: detect
env:
EVENT: ${{ github.event_name }}
REF: ${{ github.ref }}
BEFORE_SHA: ${{ github.event.before }}
HEAD_SHA: ${{ github.sha }}
BASE_REF: ${{ github.base_ref }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
MERGE_GROUP_BASE_SHA: ${{ github.event.merge_group.base_sha }}
run: |
set -euo pipefail

run_all=false
changed=""

case "$EVENT" in
workflow_dispatch)
run_all=true
;;
pull_request)
if ! changed=$(git diff --name-only "${BASE_SHA}...HEAD" 2>/dev/null); then
echo "diff against pull request base failed; running BYOO OTel collector checks"
run_all=true
fi
;;
push)
if [ -z "${BEFORE_SHA}" ] || [ "${BEFORE_SHA}" = "0000000000000000000000000000000000000000" ]; then
run_all=true
elif ! changed=$(git diff --name-only "${BEFORE_SHA}..${HEAD_SHA}" 2>/dev/null); then
echo "diff ${BEFORE_SHA}..${HEAD_SHA} failed; running BYOO OTel collector checks"
run_all=true
fi
;;
merge_group)
if [ -n "${MERGE_GROUP_BASE_SHA}" ]; then
if ! changed=$(git diff --name-only "${MERGE_GROUP_BASE_SHA}...HEAD" 2>/dev/null); then
echo "diff against merge group base failed; running BYOO OTel collector checks"
run_all=true
fi
else
run_all=true
fi
;;
*)
run_all=true
;;
esac

if [ "$REF" = "refs/heads/main" ]; then
run_all=true
fi

if [ "$run_all" = "true" ]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
exit 0
fi

if printf "%s\n" "$changed" | grep -qE '^(src/compute-plane-services/byoo-otel-collector/|tools/ci/check-byoo-otel-collector-version|tools/ci/test-check-byoo-otel-collector-version|\.github/workflows/byoo-otel-collector\.yml$)'; then
echo "changed=true" >> "$GITHUB_OUTPUT"
else
echo "changed=false" >> "$GITHUB_OUTPUT"
fi

version:
name: check VERSION update
needs: detect
if: needs.detect.outputs.changed == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Run version gate tests
run: ./tools/ci/test-check-byoo-otel-collector-version

- name: Check BYOO OTel collector VERSION changed
env:
EVENT: ${{ github.event_name }}
BEFORE_SHA: ${{ github.event.before }}
HEAD_SHA: ${{ github.sha }}
BASE_REF: ${{ github.base_ref }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
MERGE_GROUP_BASE_SHA: ${{ github.event.merge_group.base_sha }}
run: ./tools/ci/check-byoo-otel-collector-version

validate:
name: validate configs (${{ matrix.mode }})
needs: detect
if: needs.detect.outputs.changed == 'true'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
mode:
- vm-container
- vm-helm
- k8s-container
- k8s-helm
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
# The generated otelcol module says `go 1.25.0`, but Linux
# builds of OTel v0.157.0 need the patched toolchain line used
# by this subtree's Bazel module.
go-version-file: src/compute-plane-services/byoo-otel-collector/go.work

- name: Validate generated collector configs
working-directory: src/compute-plane-services/byoo-otel-collector
env:
GOCACHE: ${{ runner.temp }}/go-cache
GO_BUILD_P: "1"
run: ./scripts/validate-otelconfig.sh "${{ matrix.mode }}"
22 changes: 22 additions & 0 deletions docs/ngc-managed/cluster-management/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,28 @@ pod and merged with the generated config at runtime.
logLevel: debug
```

BYOO collector debug and log chunking example:

```yaml
agentConfig:
mergeConfig: |
agent:
byooLogChunking:
enabled: true
maxPayloadBytes: 262144
byooDebugMode:
enabled: true
byooOtelCollector:
exporterHelper:
timeout: 30s
sendingQueue:
batch:
flushTimeout: 200ms
sizer: bytes
minSize: 1000000
maxSize: 1000000
```

BYOO metric subset example:

```yaml
Expand Down
22 changes: 22 additions & 0 deletions docs/user/cluster-management/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,28 @@ isolated test clusters that run the LLM request router tunnel without TLS. For
the full LLM addon setup, see
[LLM Function Enablement](../llm-function-enablement.md).

BYOO collector debug and log chunking example:

```yaml
agentConfig:
mergeConfig: |
agent:
byooLogChunking:
enabled: true
maxPayloadBytes: 262144
byooDebugMode:
enabled: true
byooOtelCollector:
exporterHelper:
timeout: 30s
sendingQueue:
batch:
flushTimeout: 200ms
sizer: bytes
minSize: 1000000
maxSize: 1000000
```

BYOO metric subset example:

```yaml
Expand Down
6 changes: 3 additions & 3 deletions src/compute-plane-services/byoo-otel-collector/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ otelconfig validation. Do not add a subtree `.gitlab-ci.yml`.
Use the script instead of editing version strings by hand:

```bash
./scripts/update-collector-version.sh v0.153.0 v1.59.0
./scripts/update-collector-version.sh v0.157.0 v1.63.0
# If service release tags are already ahead of the collector patch:
./scripts/update-collector-version.sh v0.153.0 v1.59.0 0.153.2
./scripts/update-collector-version.sh v0.157.0 v1.63.0 0.153.2
```

The script updates version references in `otel-collector-build.yaml`,
`AGENTS.md`, `README.md`, `Makefile`, `Dockerfile`,
`Dockerfile.nvcf-otel-collector`, `scripts/regenerate-otelcol.sh`, and
`VERSION`. It also updates `.gitlab-ci.yml` when that file exists. Run it from
the BYOO collector root. You can pass versions with or without the `v` prefix
(for example, `v0.153.0` or `0.153.0`). Pass the optional `v1.x.y` provider
(for example, `v0.157.0` or `0.157.0`). Pass the optional `v1.x.y` provider
version when the stable collector modules need a matching release, and pass the
optional app release override when existing service tags require the next BYOO
patch version. The app release major/minor must match the collector
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ RUN cd otelcol && \
FROM nvcr.io/nvidia/distroless/go:v4.0.4 AS nvcf-otel-collector

LABEL description="NVCF OpenTelemetry Collector - Custom build with curated components for NVCF services"
LABEL version="0.153.0"
LABEL version="0.157.0"

COPY --from=builder-otelcol /app/output/otelcol-contrib /otelcol-contrib

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ use_repo(
"com_github_kelseyhightower_envconfig",
"com_github_open_telemetry_opentelemetry_collector_contrib_exporter_azuremonitorexporter",
"com_github_open_telemetry_opentelemetry_collector_contrib_exporter_datadogexporter",
"com_github_open_telemetry_opentelemetry_collector_contrib_exporter_prometheusexporter",
"com_github_open_telemetry_opentelemetry_collector_contrib_exporter_prometheusremotewriteexporter",
"com_github_open_telemetry_opentelemetry_collector_contrib_exporter_splunkhecexporter",
"com_github_open_telemetry_opentelemetry_collector_contrib_extension_basicauthextension",
Expand Down
32 changes: 13 additions & 19 deletions src/compute-plane-services/byoo-otel-collector/MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/compute-plane-services/byoo-otel-collector/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: test docker-build docker-run update-examples update-config-template validate-config

DOCKER_TAG := $(shell whoami)-dev
OTEL_BUILDER_VERSION ?= v0.153.0
OTEL_BUILDER_VERSION ?= v0.157.0

test:
find . -name go.mod -execdir go test -v ./... \;
Expand Down
Loading
Loading