Context
Surfaced by the collector pipeline testing design (issue #73, see
docs/research/collector-pipeline-testing.md). Enabler for the invariant
sub-issues (#74, #75, #76, #77) under the epic in issue #63.
Problem
The proof-of-concept generates traces from inside package synth because it
reuses the unexported walkTrace. Every pipeline-testing invariant needs to
generate motel traces into a real OTLP exporter, so as written they would all
have to live inside package synth or duplicate the generation machinery. The
reusable harness (pkg/pipelinetest) is OTLP-only and deliberately does not
depend on synth, so it cannot drive generation itself.
Proposed work
Expose a small public API in pkg/synth that emits a topology's traces into a
caller-provided TracerProvider (or exporter) — for example, generating N
traces from a *Topology with a given seed and span limit. This is essentially
the loop in SampleTraces and pkg/synth/pipeline_test.go made public and
exporter-agnostic.
Acceptance criteria
- Public, exporter-agnostic generation API in
pkg/synth
- The pipeline-testing PoC and future invariants drive generation through it,
not through the unexported walkTrace
- Unit coverage that the API emits the expected spans into an in-memory exporter
Context
Surfaced by the collector pipeline testing design (issue #73, see
docs/research/collector-pipeline-testing.md). Enabler for the invariantsub-issues (#74, #75, #76, #77) under the epic in issue #63.
Problem
The proof-of-concept generates traces from inside
package synthbecause itreuses the unexported
walkTrace. Every pipeline-testing invariant needs togenerate motel traces into a real OTLP exporter, so as written they would all
have to live inside
package synthor duplicate the generation machinery. Thereusable harness (
pkg/pipelinetest) is OTLP-only and deliberately does notdepend on
synth, so it cannot drive generation itself.Proposed work
Expose a small public API in
pkg/synththat emits a topology's traces into acaller-provided
TracerProvider(or exporter) — for example, generating Ntraces from a
*Topologywith a given seed and span limit. This is essentiallythe loop in
SampleTracesandpkg/synth/pipeline_test.gomade public andexporter-agnostic.
Acceptance criteria
pkg/synthnot through the unexported
walkTrace