ASAPQuery Integration - #74
Closed
GnaneshGnani wants to merge 5 commits into
Closed
GnaneshGnani wants to merge 5 commits into
GnaneshGnani wants to merge 5 commits into
Conversation
This was referenced Mar 24, 2026
3 tasks
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.
Changes
Code changes
processor/kllprocessor/processor.goprocessor/countminsketchprocessor/processor.goprocessor/countsketchprocessor/processor.goImplementation pattern used in the processors
sketchlib.SerializePortable().proto.Marshal(env).Go module file changes
sketchlibreplace lines were commented where needed so modules resolve to the GitHub module path by default.OTLP exporter compatibility settings
encoding: protocompression: gzipornoneCompression notes
gzipis supported in both flows and is currently configured for both Raw Metrics Flow and Sketch Payload Flow test configs.gzipis especially recommended for sketch-heavy Sketch Payload Flow traffic.noneis also supported and useful for debugging payload size behavior, but it can hit request size limits more easily.Known issue
CountMinSketchSketch Payload Flow Batch mode withcompression: nonecan return repeated HTTP413responses.413(Payload Too Large).gzipenabled, payload size is reduced enough to stay under the effective limit in the validated runs.compression: gzipfor Sketch Payload Flow Batch.OTLP message shape
Common wire format (both flows):
POST /v1/metricsopentelemetry.proto.collector.metrics.v1.MetricsService/ExportExportMetricsServiceRequestgzip(ornone)gRPC transport notes
ExportMetricsServiceRequestmessage as HTTP./v1/metricsin gRPC; the RPC method isMetricsService.Export.:4317and HTTP receiver on:4318.resource_metrics -> scope_metrics -> metrics -> data_pointsstructure).Shared top-level structure:
Raw Metrics Flow message shape
In this flow, data points carry numeric values directly (gauge/sum/etc.).
How ASAPQuery treats it:
Sketch Payload Flow message shape
In this flow, processors attach serialized sketch bytes into OTLP attributes.
Sketch bytes are produced as:
SerializePortable()proto.Marshal(...)Expected sketch payload attribute keys:
kll.sketch_payloadcms.sketch_payloadcountsketch.sketch_payloadHow ASAPQuery treats it:
How to test these changes
1) Start ASAPQuery OTLP receiver
From
ASAPQuery/:cd ASAPQuery RUST_LOG=query_engine_rust=debug ./target/release/query_engine_rust \ --enable-otel-ingest \ --otel-grpc-port 4317 \ --otel-http-port 4318 \ --kafka-topic dummy \ --input-format json \ --config asap-query-engine/examples/promql/inference_config.yaml \ --streaming-config asap-query-engine/examples/promql/streaming_config.yaml \ --streaming-engine arroyo \ --prometheus-scrape-interval 15 \ --output-dir /tmp/asapquery \ --query-language promql \ --lock-strategy globalExpected startup logs include OTLP listeners on
:4317(gRPC) and:4318(HTTP).2) Run one processor config (example)
From
DataCollector/opentelemetry-collector-contrib-patch/:Raw Metrics Flow example (
KLL):cd /home/gnanesh/ProjectASAP/DataCollector/opentelemetry-collector-contrib-patch ./KLL --config cmd/kll/asap_query_config/config-otlp-pathway1.yamlSketch Payload Flow example (
KLL, batch):cd /home/gnanesh/ProjectASAP/DataCollector/opentelemetry-collector-contrib-patch ./KLL --config cmd/kll/asap_query_config/config-otlp-pathway2-batch.yamlOther processor binaries/configs:
3) Run load generator
From
DataCollector/otel_collector_benchmark/:cd ProjectASAP/DataCollector/otel_collector_benchmark go run main.go --endpoint localhost:53217 --workers 2 --hosts 5 --metrics 10 --duration 15sNotes:
localhost:53217when the processorotlpreceiver gRPC endpoint is0.0.0.0:53217.