Skip to content

fix(examples): with-telemetry.yaml -> RFC-0013 successor components (#454)#458

Merged
trilamsr merged 2 commits into
mainfrom
fix/454-with-telemetry-rfc-0013-cleanup
Jun 2, 2026
Merged

fix(examples): with-telemetry.yaml -> RFC-0013 successor components (#454)#458
trilamsr merged 2 commits into
mainfrom
fix/454-with-telemetry-rfc-0013-cleanup

Conversation

@trilamsr

@trilamsr trilamsr commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

docs/examples/with-telemetry.yaml failed tracecore validate against the OCB binary because it referenced components and a config shape retired by RFC-0013:

'receivers' unknown type: "clockreceiver"
'exporters' unknown type: "stdoutexporter"
'' has invalid keys: telemetry

Swapped to the canonical post-pivot shape, matching docs/getting-started.md and the in-repo Helm chart default:

  • hostmetrics (load scraper @ 1s) replaces clockreceiver. Note: telemetrygeneratorreceiver does not exist in opentelemetry-collector-contrib (RFC-0013 PR-E; upstream contrib issues #41687 and #43657 both closed not_planned). hostmetrics is the actual successor.
  • debug (verbosity: detailed) replaces stdoutexporter.
  • service.telemetry.metrics.readers.pull.exporter.prometheus.{host,port} replaces the legacy top-level telemetry: block (gone in PR-A2).
  • healthcheckextension at :13133/ carries liveness + readiness (the legacy block's healthz/readyz paths) via service.extensions.

Root cause

Two layers:

  1. Direct: RFC-0013 PR-A2 + PR-E retired clockreceiver and stdoutexporter and folded the top-level telemetry: block into upstream service.telemetry; the operator example was not migrated.
  2. Why it drifted undetected: scripts/validator-recipe.sh only walks docs/integrations/*.md; docs/examples/ has no CI gate, so the file stayed broken on main until PR docs(integrations): add trust-posture callout to 11 recipes (#443) #453 reviewer noticed.

A follow-up to add a docs/examples/*.yaml validate sweep to make validator-recipe (or a sibling validator-examples target) is the right structural fix. I'd file it as a separate issue if reviewer agrees the scope is correct.

A+ sweep finding

Scanned all repo YAMLs for the retired symbols. One additional broken example surfaced: module/receiver/ncclfrreceiver/example_config.yaml still references stdoutexporter, and its README invokes the retired tracecore collect subcommand. Filed as #457 (out of scope for #454).

docs/examples/prometheus-alerts.example.yaml mentions stdoutexporter in a regex-example comment string, but the file is a Prometheus rules file (not a collector config) and structurally validates fine. Noted in #457.

Verification

$ ./_build/tracecore validate --config=docs/examples/with-telemetry.yaml
# (was exit 1 pre-fix; now exit 0)

$ make validator-recipe
validator-recipe: 14 validated, 3 skipped (non-linux host) of 12 recipe(s)
PASS test 1..5; validator-recipe_test: all assertions passed

$ make smoke-quickstart
smoke-quickstart: validated 2 YAML payload(s) and shell-syntax-checked 8 shell block(s) across 2 quickstart doc(s)

Pre-commit gates (DCO, AI-trailer, golangci-lint, go vet, go mod verify, attribute-namespace-check) all passed.

Test plan

docs(examples): fix with-telemetry.yaml so it validates against the OCB-assembled tracecore binary. Swap retired clockreceiver / stdoutexporter / top-level telemetry: block for hostmetrics + debug + service.telemetry + healthcheckextension per RFC-0013.

Closes #454.

Closes #454.

docs/examples/with-telemetry.yaml referenced the in-tree clockreceiver
and stdoutexporter (retired by RFC-0013 PR-A2 + PR-E) and the legacy
top-level telemetry: block (retired by PR-A2 in favour of the upstream
service/telemetry shape). The OCB-assembled tracecore binary rejected
all three:

  'receivers' unknown type: "clockreceiver"
  'exporters' unknown type: "stdoutexporter"
  '' has invalid keys: telemetry

Swap to the canonical post-pivot shape, matching docs/getting-started.md
and the in-repo Helm chart default:

  - hostmetrics (load scraper @ 1s) replaces clockreceiver.
    telemetrygeneratorreceiver does not exist in opentelemetry-collector-
    contrib (RFC-0013 PR-E, contrib #41687 + #43657 closed not_planned).
  - debug (verbosity: detailed) replaces stdoutexporter.
  - service.telemetry.metrics.readers.pull.exporter.prometheus
    replaces the top-level telemetry: block.
  - healthcheckextension at :13133/ wires liveness + readiness
    (the legacy block's healthz/readyz paths) via service.extensions.

Verify:
  ./_build/tracecore validate --config=docs/examples/with-telemetry.yaml
  -> exit 0 (was exit 1 pre-fix)

A+ sweep noted module/receiver/ncclfrreceiver/example_config.yaml also
references stdoutexporter; filed #457 (out of scope for #454).

Signed-off-by: Tri Lam <tree@lumalabs.ai>
@trilamsr

trilamsr commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

Independent Adversarial Review — PR #458

B/A/A+ Criteria

Findings

No issues. All specific probes verified:

  1. clockreceiver → hostmetrics: RFC-0013 PR-E successor confirmed. telemetrygeneratorreceiver mythical per upstream #41687/#43657 (both closed not_planned). Matches docs/getting-started.md + Helm chart defaults.

  2. stdoutexporter → debug: RFC-0013 PR-A2 successor confirmed. verbosity: detailed is valid OTel level.

  3. telemetry: block → service.telemetry.metrics.readers: RFC-0013 §4 upstream adoption. Host/port defaults preserved. otelcol_* metric names per contract §3.

  4. healthcheckextension addition: RFC-0013 §2 adoption matrix official. Not scope creep — replaces legacy /healthz and /readyz paths with upstream extension's automatic /livez and /readyz subpaths. Parity, not addition. Already documented in docs/integrations/k8sobjects-events.md. Extension bundled in builder-config.yaml line 66.

  5. Comment density: ~24 load-bearing comment lines (up from ~12). No bloat — each comment addresses a real operator question (how to run, test, toggle optional features, migration path). M2 reference correctly removed.

  6. Component availability: hostmetrics ✓ (builder-config.yaml:28), debug ✓ (line 60), health_check ✓ (line 66).

  7. Service.extensions wiring: Correct reference to defined extension key.

  8. Invocation command: ./_build/tracecore --config=… correct per PR-A2; matches docs/getting-started.md.

Simplification Sweep

Comments: All load-bearing. No simplification without losing operator clarity.

Configuration: Minimal. No redundant keys.

Verdict

GRADE: A+

  • RFC-0013 compliance: complete ✓
  • Correctness: verified ✓
  • Operator clarity: improved ✓
  • Scope discipline: tight ✓

Ready to merge. No blockers.

@trilamsr trilamsr enabled auto-merge (squash) June 2, 2026 02:32
trilamsr added a commit that referenced this pull request Jun 2, 2026
## Summary

Sibling cleanup to #458 (which closed #454).
`module/receiver/ncclfrreceiver/example_config.yaml` referenced the
retired `stdoutexporter`, and its README invoked the deleted `tracecore
collect` subcommand.

Both were retired by [RFC-0013
PR-A2](../blob/main/docs/rfcs/0013-distro-first-pivot.md):
`stdoutexporter` -> upstream `debug`; `collect` subcommand removed --
the OCB-assembled binary takes `--config=` directly.

Applies the same recipe as #458:

- `exporters.stdoutexporter` -> `exporters.debug` with `verbosity:
detailed` (matches the old stdoutexporter output shape).
- Pipeline `exporters: [stdoutexporter]` -> `exporters: [debug]`.
- README's `tracecore collect --config …` invocation ->
`./_build/tracecore --config=…`, with an explanatory pointer back to
RFC-0013 PR-A2.

## Root cause

Two layers, identical to #458:

1. **Direct**: RFC-0013 PR-A2 retired the in-tree `stdoutexporter` and
the `collect` subcommand; the operator-facing receiver example/README
was not migrated alongside.
2. **Why it drifted undetected**: `scripts/validator-recipe.sh` only
walks `docs/integrations/*.md`. There is no CI gate that walks
`module/**/example_config.yaml`, so the file stayed broken on `main`
until #458's A+ sweep noticed.

A structural fix would extend the validator sweep to
`module/**/example_config.yaml` (and `docs/examples/*.yaml`, per #458).
Out of scope for this PR -- if reviewer agrees, I'll file as a
follow-up.

## Verification

```
$ ./_build/tracecore validate --config=module/receiver/ncclfrreceiver/example_config.yaml
# pre-fix:  exit 1 ('exporters' unknown type: "stdoutexporter")
# post-fix: exit 0

$ cd module && go test -race -count=1 ./receiver/ncclfrreceiver/...
ok    github.com/tracecoreai/tracecore/module/receiver/ncclfrreceiver    3.247s

$ make validator-recipe
validator-recipe: 14 validated, 3 skipped (non-linux host) of 12 recipe(s)
PASS test 1..5; validator-recipe_test: all assertions passed
```

Pre-commit gates green: golangci-lint, go vet, go mod verify,
attribute-namespace-check, DCO sign-off.

## A+ sweep

Walked every `module/**/example_config.yaml` for the retired symbols
(`stdoutexporter`, `clockreceiver`, `telemetrygeneratorreceiver`,
`tracecore collect`):

- `module/processor/patterndetectorprocessor/example_config.yaml` --
`tracecore validate` exit 0. Clean.
- `module/processor/rankjoinprocessor/example_config.yaml` -- `tracecore
validate` exit 0. Clean.
- `module/receiver/ncclfrreceiver/example_config.yaml` -- fixed in this
PR.

No additional rot under `module/`.

## Test plan

- [x] `tracecore validate` was exit 1, now exit 0 against the fixed
`example_config.yaml`.
- [x] `go test -race -count=1 ./receiver/ncclfrreceiver/...` green (no
receiver source changed; sanity).
- [x] `make validator-recipe` green (sibling-example sanity).
- [x] A+ sweep across `module/**/example_config.yaml` -- only this file
required fixing.

```release-notes
docs(examples): fix module/receiver/ncclfrreceiver/example_config.yaml so it validates against the OCB-assembled tracecore binary. Swap retired stdoutexporter for upstream debug, and update the README's `tracecore collect --config ...` invocation to `./_build/tracecore --config=...` per RFC-0013 PR-A2.
```

Refs: #458, RFC-0013 PR-A2.

Closes #457.

Signed-off-by: Tri Lam <tree@lumalabs.ai>
…y-rfc-0013-cleanup

# Conflicts:
#	docs/examples/with-telemetry.yaml
@trilamsr trilamsr merged commit c5ffb37 into main Jun 2, 2026
12 checks passed
@trilamsr trilamsr deleted the fix/454-with-telemetry-rfc-0013-cleanup branch June 2, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(examples): with-telemetry.yaml references retired clockreceiver + stdoutexporter (RFC-0013 cleanup)

1 participant