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
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ coverage.txt
__debug_bin*

# Go workspace
go.work
# RFC-0013 PR-I.1a (2026-05-31): go.work is committed because the in-repo
# Go submodule under module/ requires workspace mode to resolve locally
# during dev builds. go.work.sum stays ignored — it is a per-environment
# cache equivalent to go.sum but for workspace-resolved transitive deps,
# and would create cross-platform churn without adding integrity value
# (each module's own go.sum already pins its direct + transitive deps).
go.work.sum

# IDE
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Build-tag `dcgm` retired (`make build-tags` no longer vets `-tags dcgm`). `make

**PR-J landed: four receiver-side integration recipes for the v0.2.0 swap.** New docs ship under `docs/integrations/`: [`filelog-container.md`](docs/integrations/filelog-container.md) (replaces `containerstdout` — `filelogreceiver` with the container parser stanza, `k8sattributesprocessor`, and `file_storage` for restart-safe checkpoints), [`journald-kernel.md`](docs/integrations/journald-kernel.md) (replaces `kernelevents` — `journaldreceiver` + `filelogreceiver` on `/dev/kmsg` + OTTL `transform` that preserves the customer-stable `kernelevents.xid` and `gpu.id` attributes from RFC-0013 §3), [`k8sobjects-events.md`](docs/integrations/k8sobjects-events.md) (replaces `k8sevents` — `k8sobjectsreceiver` watch mode + OTTL `transform` that derives the eleven-entry `k8s.event.hint` enum), and [`prometheus-scrape.md`](docs/integrations/prometheus-scrape.md) (replaces `dcgm` + `kueue` — generic `prometheusreceiver` scrape with the four GPU vendor exporters tabulated and an OTTL stamp of the `gpu.vendor` resource attribute). Every recipe ships a matching `docs/integrations/examples/*.yaml` validated end-to-end by `make validator-recipe` against the OCB-built `./_build/tracecore validate`. The k8sobjects recipe introduces a new `<!-- tested-against: requires-k8s-cluster -->` marker recognized by both `scripts/doc-check.sh` (accepted) and `scripts/validator-recipe.sh` (skipped with a named log line) because the upstream `k8sobjectsreceiver`'s `Validate()` enumerates server-preferred resources via the discovery client and therefore cannot be exercised offline — its example is gated by the kind-cluster job that runs the chart. Updates `docs/migration/v0.1-to-v0.2.md` to flip the PR-J open-item to done with file pointers. CHANGELOG only — no operator-visible runtime change; v0.2.0 release still gates on PR-K (in-tree-receiver deletion) and PR-L (final migration guide body).

**PR-I.1a landed: in-repo Go submodule scaffold at `module/`.** Empty submodule (`module/go.mod` declaring `module github.com/tracecoreai/tracecore/module` on `go 1.26.3` — no source files yet) plus root `go.work` listing `.` and `./module` so dev builds resolve both modules without publishing. The `module/v0.0.1` genesis tag will be cut after merge to validate the publish path (Go module proxy can resolve the empty submodule) before any real code moves in PR-I.1b. No file movement and no behaviour change in this PR; the OCB binary at `./_build/tracecore` and `go build ./...` / `go vet ./...` / `go test ./...` all stay green side-by-side. Two side-effects: `.gitignore` un-ignores `go.work` (the workspace file is now committed; `go.work.sum` stays ignored as a per-environment cache); `make build` sets `GOWORK=off` for the OCB invocation because the builder generates `./_build/{go.mod,main.go}` and runs `go build` from inside `./_build/` — workspace mode would try to resolve `./_build` as a package of the root module (since the workspace lists `.`) and fails with "main module does not contain package github.com/tracecoreai/tracecore/_build". `builder-config.yaml` gains a commented-out skeleton for the future `receivers:` / `processors:` / `replaces:` entries that PR-I.1b and PR-I.2 will uncomment — keeping the wiring as YAML now makes those PRs mechanical (no indentation / module-path typo risk). `go.work` carries a `replace google.golang.org/genproto => ...v0.0.0-20240227224415-6ceb2ff114de` directive to disambiguate the workspace's package graph — viper@v1.12.0 (transitive dep of the golangci-lint tool chain) pulls the old monolithic `google.golang.org/genproto` which provides `googleapis/rpc/status`, a path now owned by the split-out `google.golang.org/genproto/googleapis/rpc` that grpc-go imports. Single-module mode prunes the conflict via MVS; workspace mode surfaces it as an ambiguous-import build error. The replace points the workspace at a recent monolithic-genproto tag that no longer ships the conflicting path; `GOWORK=off` builds ignore the block entirely.

**PR-E unblocked.** Original RFC-0013 §migration plan named `telemetrygeneratorreceiver` as the upstream replacement for `clockreceiver`. Verified 2026-05-30: the receiver does not exist in `opentelemetry-collector-contrib` at any tag from v0.95.0 through v0.130.0; two community proposals (contrib issues #41687 and #43657) were closed `not_planned`. Replacement landed on `hostmetricsreceiver` (loadscraper @ 1s) — an upstream OCB-bundled receiver that emits 3 low-cardinality series (`system.cpu.load_average.{1m,5m,15m}`) at the cadence the bench's pass condition needs (first parseable JSON line at the sink — see `bench/install/run.sh`). This PR adds `hostmetricsreceiver` to `builder-config.yaml`, adds a `receivers.hostmetrics` opt-in block to the chart values (default disabled — chart default stays `clockreceiver` this release), and flips `bench/install/tracecore-values.yaml` to enable hostmetrics + disable clockreceiver. RFC-0013 §migration PR-E + §4 + §7 deletion table updated. Chart-default flip from `clockreceiver` to `hostmetrics` + source-deletion of `components/receivers/clockreceiver/` are deferred to PR-K (in-tree-receiver deletion wave) so the values-keys migration ships together with `NOTES.txt` deprecation warnings and the coordinated migration of ~92 in-tree test-fixture references in one cut rather than two operator-visible changes.

Remaining v0.1.0 work: PR-F.1 (delete `components/receivers/dcgm/` + `pkg/dcgm/` + `internal/selftelemetry/` + `internal/telemetry/`) landed in this Unreleased section; PR-F.2 (delete `internal/componentstatus/`) deferred until `internal/pipeline` migrates to upstream `componentstatus`. Chart default pipeline still hardwires the to-be-deleted receivers, so the receiver-side deletions (clockreceiver / containerstdout / kernelevents / k8sevents) ride with PR-K alongside the v0.2.0 recipe migration to avoid an interim chart break.
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,15 @@ build: ## Build tracecore via OpenTelemetry Collector Builder using builder-con
@# it with the target GOOS/GOARCH preserved -- the builder's inner
@# `go build` inherits those and produces a target-arch binary.
@# GOBIN keeps the install local + deterministic; PATH-independent.
@# GOWORK=off isolates OCB from the root go.work (RFC-0013 PR-I.1a):
@# OCB generates ./_build/{go.mod,main.go} and runs `go build` from
@# inside ./_build/. With workspace mode active, that inner build
@# tries to resolve ./_build as a package of the root module (since
@# the workspace lists `.`) and fails with "main module does not
@# contain package github.com/tracecoreai/tracecore/_build". The
@# generated module is intentionally non-workspace; isolate it.
GOOS= GOARCH= GOBIN=$(CURDIR)/_build/.tools go install go.opentelemetry.io/collector/cmd/builder@v0.110.0
$(CURDIR)/_build/.tools/builder --config=builder-config.yaml
GOWORK=off $(CURDIR)/_build/.tools/builder --config=builder-config.yaml

test: ## Run unit tests with the race detector.
go test -race ./...
Expand Down
34 changes: 32 additions & 2 deletions builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,35 @@ extensions:
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/extension/healthcheckextension v0.110.0
- gomod: go.opentelemetry.io/collector/extension/zpagesextension v0.110.0

# tracecoreai/tracecore-components/{receiver/ncclfrreceiver,processor/rankjoinprocessor,processor/patterndetectorprocessor}
# add in PR-I (v0.2.0) after the separate module repo is created.
# RFC-0013 PR-I.1a (2026-05-31): scaffold the in-repo Go submodule under
# module/ — empty in this PR. PR-I.1b will `git mv` nccl_fr →
# module/receiver/ncclfrreceiver/ and add the `receivers:` entry plus
# uncomment the `replaces:` block below (no other change). PR-I.2 adds
# the two processor entries. Keeping the wiring as commented YAML now
# makes PR-I.1b / PR-I.2 mechanical (delete the comment prefix; no risk
# of mis-indented yaml or typo'd module path). Supersedes the prior
# "separate module repo" plan — see RFC-0013 §migration line 246 for
# the in-repo-submodule rationale (one fork, one CI, one DCO).
#
# receivers (add to the `receivers:` block above, NOT here):
# - gomod: github.com/tracecoreai/tracecore/module/receiver/ncclfrreceiver v0.1.0
#
# processors (add to the `processors:` block above at PR-I.2):
# - gomod: github.com/tracecoreai/tracecore/module/processor/rankjoinprocessor v0.1.0
# - gomod: github.com/tracecoreai/tracecore/module/processor/patterndetectorprocessor v0.1.0
#
# The `replaces:` block below is at ROOT level (zero indent — sibling
# to `dist:`, `receivers:`, `processors:`, `exporters:`, `extensions:`),
# matching the OCB v0.110.0 schema (cmd/builder/internal/builder/config.go
# `Config.Replaces []string \`mapstructure:"replaces"\``) and the canonical
# upstream pattern in opentelemetry-collector-releases'
# `distributions/otelcol-contrib/manifest.yaml`, which places `replaces:`
# as the final root-level block after all component lists. Uncommenting
# in PR-I.1b is byte-clean: strip the `# ` prefix from the four lines
# below; indentation already matches root level.
#
# replaces:
# # Resolve the submodule against the in-repo checkout during dev /
# # release-tag-cut builds. Required because module/vX.Y.Z is not
# # published to a proxy — OCB would fail to fetch otherwise.
# - github.com/tracecoreai/tracecore/module => ./module
46 changes: 46 additions & 0 deletions go.work
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// RFC-0013 PR-I.1a (2026-05-31): root go.work pinning the in-repo Go
// submodule under module/ alongside the root module. Required because
// module/vX.Y.Z is not published to a proxy during PR-I.1a — local dev
// builds resolve module/ → ./module via this workspace file. OCB picks
// the same resolution up from builder-config.yaml's `replaces: ./module`
// entry (added in PR-I.1b alongside the first `receivers:` entry).
//
// The Go directive matches go.mod and module/go.mod exactly. workspace
// mode requires go.work's `go` directive be >= every member module's.
go 1.26.3

use (
.
./module
)

// RFC-0013 PR-I.1a (2026-05-31): redirect the old monolithic genproto
// in the workspace graph to a tag that no longer ships googleapis/rpc/status.
//
// Root cause: google.golang.org/grpc@v1.81.1's status package imports
// google.golang.org/genproto/googleapis/rpc/status. That path lives in
// the split-out google.golang.org/genproto/googleapis/rpc submodule
// (current tag v0.0.0-20260526163538-3dc84a4a5aaa) AND, historically, in
// google.golang.org/genproto@v0.0.0-20220519153652-3a47de7e79bd (the last
// monolithic-genproto release before the split). Two modules provide the
// same import path -> ambiguous-import build error.
//
// Why workspace mode trips on it but single-module mode doesn't: Go's
// module loader prunes transitive indirect deps under MVS in single-module
// mode (GOWORK=off), and the old monolithic genproto sits behind a viper
// transitive that no live import path touches -> it gets pruned. Workspace
// mode (Go 1.18+) loads the union of every member module's require lines
// without that pruning step, so the old monolithic genproto survives into
// the package-load phase and collides with the split-out submodule.
//
// Why not "just bump viper": viper@v1.12.0 is the dep that pulls the old
// monolithic genproto, and it's pinned by the golangci-lint v2 module
// (verified 2026-05-31 — even v2.12.2, the latest, still pins viper v1.12.0).
// We don't import viper directly; bumping it would require forking
// golangci-lint or waiting for upstream. The redirect here is the smallest
// in-tree fix that keeps workspace mode usable today.
//
// No effect on single-module builds; GOWORK=off ignores this block. The
// redirect can be removed once golangci-lint's viper pin moves past the
// pre-split genproto era (track upstream golangci-lint go.mod).
replace google.golang.org/genproto => google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de
36 changes: 36 additions & 0 deletions module/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# `module/` — TraceCore moat Go submodule

This directory is a separate Go module from the repo root. Its module path
is `github.com/tracecoreai/tracecore/module`, and it is published via tags
of the form `module/vX.Y.Z` (Go submodule prefix).

## Status

PR-I.1a (this PR) ships the **empty scaffold only**: `module/go.mod` declaring
the module path, and a root `go.work` so dev builds resolve both modules
without publishing. No code lives here yet.

After this PR merges, the tag `module/v0.0.1` is cut as the genesis tag
to validate the publish path (the empty submodule resolves through the Go
module proxy) before any real code moves in subsequent PRs.

## Roadmap

Per RFC-0013 §migration:

- **PR-I.1b** — `git mv components/receivers/nccl_fr` → `module/receiver/ncclfrreceiver/`
and `git mv pkg/nccl/fr_parser` → `module/pkg/nccl/fr_parser/`. Renames the
Go package `nccl_fr` → `ncclfrreceiver`. No new tag (next bump is PR-I.2).
- **PR-I.2** — adds `module/processor/rankjoinprocessor/` and
`module/processor/patterndetectorprocessor/` net-new. Tags `module/v0.1.0`.

## Why an in-repo submodule (not an external repo)

Single fork, one CI, one issue tracker, one DCO, one PR for cross-cutting
changes. Go submodule tags give an independent version line for the moat
components without the operational cost of a second repository. OCB's
`gomod:` resolves in-repo submodules identically to external repos via the
`replaces: ./module` entry in `builder-config.yaml`.

See [RFC-0013 §migration PR-I](../docs/rfcs/0013-distro-first-pivot.md) for
the full rationale.
14 changes: 14 additions & 0 deletions module/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright TraceCore Authors
// SPDX-License-Identifier: Apache-2.0

// Package module hosts the in-repo Go submodule for receivers/processors/exporters
// moved out of the root module per RFC-0013. Contents land in PR-I.1b (nccl_fr move)
// and PR-I.2 (rankjoinprocessor + patterndetectorprocessor).
//
// This file exists so that `module/v0.0.1` (the genesis tag cut after PR-I.1a
// merges) resolves through the Go module proxy — proxies typically require at
// least one .go file in the module root to validate the module and surface it
// in `go list`. Without it, `GOPROXY=https://proxy.golang.org go list -m
// github.com/tracecoreai/tracecore/module@v0.0.1` may fail with a 404 or
// "no Go source files" error, breaking the PR-I.1b release-tag-cut workflow.
package module
3 changes: 3 additions & 0 deletions module/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/tracecoreai/tracecore/module

go 1.26.3
Loading