feat(otap): native sketch protocol with runnable create-merge-estimate demo - #10
Closed
zzylol wants to merge 10 commits into
Closed
feat(otap): native sketch protocol with runnable create-merge-estimate demo#10zzylol wants to merge 10 commits into
zzylol wants to merge 10 commits into
Conversation
Extend the real-RuntimePipeline E2E to three independently configured
`urn:asap:processor:asap_sketches` nodes sharing one stable URN:
- create (transmit_sketch=true) scalar gauges -> self-describing DDSketch
- merge (transmit_sketch=true) merges the envelope as sketch state,
never re-expanding it to scalar samples
- estimate (transmit_sketch=false, quantiles=[0.5,0.99]) -> scalar p50/p99
Assertions are made at the exporter boundary: p50/p99 relative accuracy,
genuinely-scalar output shape, output metric name, and `route` label
preserved across all three processor hops plus three timer flushes.
Thread the estimate- and wire-control knobs through
`AsapSketchesUserConfig` -> `PluginConfig` (transmit_sketch, quantiles,
encoding, delta_transmission, default_key, omit_resource_attrs,
global_aggregation, emit_window_stats) and account for the
series-identity / factory-affecting ones in `requires_precompute_rebuild`
so a runtime `NodeControlMsg::Config` push rebuilds the Precompute when
it must. Document them in sample.toml and the plugin README.
Add docs/demo-guide.md: a presentation-ready walkthrough of the demo.
Verified: cargo test --features otap-engine (all pass), clippy
--all-targets --features otap-engine -D warnings, cargo fmt --check.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JTn742jM8FKwqdTDXGSz3p
Replace the plain-text topology sketch in demo-guide.md with a mermaid flowchart matching df-processor-topology.md's style: the five nodes in one RuntimePipeline subgraph, each processor labelled with its config, edges labelled with the payload that crosses them. Drop the now-duplicated "test nodes vs. real implementations" sentence. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JTn742jM8FKwqdTDXGSz3p
This was referenced Aug 31, 2026
Contributor
Author
|
Split into the following review stack:
Please review and merge in the order above. Closing this aggregate PR to avoid duplicate merging. |
This was referenced Aug 31, 2026
Contributor
Author
|
Final review stack (supersedes the earlier 5-layer index):
#11 is closed because its two scopes were separated into #16 and #17. Review/merge in the order above. |
Contributor
Author
|
Benchmark follow-up: #18 is stacked on top of #17. It adds the internal OTAP-style nightly/compare methodology, semantic-convention-shaped metrics, correctness checks, Criterion throughput, CPU/peak-RSS capture, and profiling guidance. It is intentionally outside the six functional review layers and should receive separate manual review. |
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.
Why
Implements the SCHEMA / DICTIONARY / LABELS / RECORD model on native OTAP metrics, with a runnable scalar -> create sketch -> merge sketch -> estimate flow.
Wire format
Sketch records use OTLP Summary semantics.
SummaryDpAttrs["sketch.envelope"]carries the canonical self-describing ASAPv1 format fromasap_sketchlib.The codec validates the ASAPv1 magic, version, kind ID, and exact framed lengths. The demo uses KLL because its ASAPv1 format is implemented in
asap_sketchlib.Multi-process demo
cd asap-precompute-rs cargo run --bin asap-otap-demo --features otap-engineThe two create processors, merge processor, and estimate processor each run in a separate child OS process with their own real OTAP
RuntimePipeline. Process boundaries carry standard protobufExportMetricsServiceRequestmessages and reconstruct nativeOtapPdatainside each worker.Each worker routes output through the official
urn:otel:processor:debugin detailed metrics mode. Intermediate payload/type views go to per-worker trace files, not stdout. The obsolete private sketch batch/dictionary/wire/lifecycle implementation is deleted.Verification
sketch.envelopecargo test --features otap-engine(144 passed)cargo clippy --features otap-engine --all-targets -- -D warningscargo fmt --all -- --checkgit diff --check