Retire the collector-facing emission pipeline - #725
Merged
Merged
Conversation
zzylol
added a commit
that referenced
this pull request
Sep 14, 2026
…#726) The 12 tests were ignored by #725 because their payload construction assumed the summary families the legacy path was told to use via `sketch_type_override`. ASAPPlanner has no such override — it picks from the accuracy target — so the tests now read back what it committed to. Three things had to line up. **Grouping.** The population key the backend materializes under has to match the attributes the producer puts on the wire. The queries carried no grouping, so the planner derived an empty `grouping_labels` while the frames carried `service`/`zone`, and ingest rejected them with `active schema resolves 0` or `frame has no matching transmission rule`. The queries are now registered as `sum by (service) (...)`. **Registration is not readout.** Wrapping the *query* in the same aggregation returns no result: the stored summaries are already per-service, so the inner form reads them and the result carries the label. Registration decides how the materialization is keyed; readout uses the original shape. **Families follow the planner.** Measured, not assumed: | query | old override | planner's choice | |---|---|---| | `quantile_over_time(0.5, request_size_bytes[1s])` | KLL | DDSketch (`alpha`) | | `count_over_time(unique_users_per_min[1s])` | HLL | CountMinSketch (`w`, `d`) | | `topk(3, count_over_time(top_endpoint_qps[1s]))` | CountSketch | CountMinSketch | Payloads are built from `materializations[0].parameters`, so a future planner change moves the fixture with it instead of breaking it. Two harness fixes: the first two tests moved to `start_full_stack` because `start_backend_http_server` never attached the physical-plan handles, and the first test's window went from 60s to 1s to agree with the pane layout the install pins. The KLL and HLL builders, the plain `start_backend_http_server` harness and the legacy streaming-config snapshot accessor go with them — every test now installs through the same physical-plan path. Closes #723. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Final step of #703 item 18, after #713, #715 and #718. Replaces #719, which was rebuilt on the current tree rather than replayed through #714's renames.
−23,503 / +801.
Why this lands as one commit
With the legacy planning endpoints gone (#718), the only remaining entry into the collector config chain was
GET /api/v1/collector-config/agent, the HTTP config provider for collector bootstrap. Removing it retires the whole chain, because every part exists to serve that entry:Splitting it would leave intermediate states that do not compile.
Deleted
emit/stage_config.rs(7,410),physical/colored_dag/(2,572),replan.rs(1,350),emit/backend_push.rs(1,043),physical/workload_planner.rs(980),pipeline.rs(843),emit/{agent,otap,telegraf}.rs(1,857),registered_workload.rs(569),store/,monitor/,physical/{plan_cache,stage_split,topology}.rs,deployment_cost/{delta,sketch_capability}.rsplus its scoring layer, and the tests covering them.registered_workload.rsis new since the first attempt — #714 introduced it as the unified planner workload, but it only ever served the legacy chain, so it retires with it.Also gone: the
USE_TYPED_STAGE_SPLITkill switch (#703 item 12 — its "off" branch was the legacy emitter),RealizationProvider::stages(item 10, no callers),physical/topology.rs(item 11, a pure re-export).Extracted, not deleted
physical::backend_stage(87 lines) keepsBackendStageConfig,BackendAggregation,BackendReadout,AggregationInput.PhysicalPlanCompilerbuilds these;backend_plan::from_stage_configconsumes them. Their collector-side neighbours (EdgeStageConfig,GatewayStageConfig,ExportTarget,StageId) do not come along.emit::backend_wire(390 lines) keeps the storage-routing classifier andbuild_backend_aggregation_json. That builder stays the single source of the aggregation wire shape, soBackendPlanmaterializations and the JSON format keep onePolicyFingerprintidentity space — the invariantfrom_stage_config's module doc calls load-bearing.deployment_costkeeps only what still has consumers:online(/api/v1/cost-model),tco(/api/v1/tco),wire(post-ASAP cost model).SketchCostsand the benchmark table move intoonline, its only remaining caller.Behaviour changes
/metricsno longer exposesasap_active_plan_id. The gauge readPlanStore, which was legacy plan history. Everyasap_runtime_*gauge is unchanged.GET /api/v1/collector-config/agentis gone. The OpAMPCollectorPlanchannel stays — ASAPCollector'sasapedgeprocessoralready implementsReceiveCollectorPlan— but a deployment pointing a collector at--config=http://control_plane:8080/api/v1/collector-config/agenthas to move to that channel.The e2e test
data_plane/tests/e2e_controller_plans_and_backend_serves.rsbuilt its config through the deleted chain. Its scaffolding is ported here —plan_materializationsrunsBackendLocalPlanningInput::into_physical_compilation_request→PhysicalPlanCompiler::compile_promql, andphysical_fixture::artifact_from_materializationstakes planner output directly, so the legacyStreamingConfigdocument is no longer an intermediate step.The 12 tests are
#[ignore]d, tracked by #723. Making them pass is a different problem from making them compile: they build their OTLP payloads from summary families the legacy path was told to use viasketch_type_override, which ASAPPlanner has no equivalent for. Measured, not assumed:..._roundtrip_kll..._roundtrip_count_sketch..._roundtrip_count_min_sketch#723 carries the five remaining failure classes and their root causes. This is the work #703 item 2 already scoped separately.
Resulting surface
Production routes are the ASAPPlanner path only:
AppStateis down toopamp,online_store,runtime_samples,active_summary_catalog,backend_client.OpampServeris constructed bare and retains onlypublish_collector_plans, which the physical path uses.Testing
cargo +1.98.0 fmt -- --check— clean.cargo +1.98.0 clippy --workspace --all-targets -- -D warnings— clean.cargo +1.98.0 test --workspace -- --test-threads=1— exit 0, zero failures.🤖 Generated with Claude Code