Repository navigation
Otel Ingest Driver - #179
Merged
Merged
Conversation
zzylol
reviewed
Mar 11, 2026
Contributor
|
@milindsrivastava1997 This PR is also a separate ingest driver from the current Kafka Arroyo path. So once ready, should be no harm to merge into main. |
zzylol
approved these changes
Mar 18, 2026
milindsrivastava1997
approved these changes
Mar 18, 2026
zzylol
added a commit
that referenced
this pull request
Oct 7, 2026
Merged KLL and top-k answers now read the saturation study's merge curves (sketch-bench#158), so --saturation-dir must hold them. The pin moves from sketch-bench#178's branch to #179's, which is stacked on it; it returns to main once both merge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zzylol
added a commit
that referenced
this pull request
Oct 7, 2026
…plan Bump rqe-optimizer to sketch-bench main (a2e0455): #178 one-study cost table, #179 KLL merge curves, #180 theory fallback, #182 top-k heap m·k. - asap-optimizer-cli takes a required --saturation-dir and passes SaturationCurves::accuracy to solve_milp, which now takes the accuracy function instead of hard-wiring the cost table's (table_accuracy, still what the tests pass). The cost table stays --atomic-costs. - Workload facts: each group may carry `shape: {zipf_s, distinct_keys, tail_index}`, mapped to MetricFacts.data_shape. A grouping without one has no sketch accuracy, so only exact accumulators serve it. - CMS-with-heap heapsize is the heap the plan priced (the deployment's `heap` param, m·TOPK_K for the windows it merges), floored at the largest literal k it serves. It was the largest k alone, which a merged answer outgrows. - Cost rows: required accuracy_metric and measured_at, no merge_accuracy; fixtures follow, and top-k fixtures carry heap 32 and 2048 rows as the table now does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
zzylol
added a commit
that referenced
this pull request
Oct 7, 2026
…tudy - §5: a single p95 level in each family's metric (error ≤ 0.05, top-k precision ≥ 0.95) for synthetic and traces; the three strictness levels and fitted trace targets are dropped, and so is the grid's strictness dimension. - §2/§6: costs and accuracy come from one study on asap_sketchlib 0.3.0: the cost table from --phase optimizer-cost (#174), a full-cross grid with the cost shape (#186), KLL merge curves (#179), top-k heap m·k (#182), per-query k with curves at 10/32/100 (#185) and the theoretical fallback (#180). Quantiles see Pareto a = 2, the cost shape. - §6: traces are Alibaba 2022 and Google 2011; BOOM is left out for now. - §8/§10: statuses as of 2026-10-07; the top-k m·k read is an assumption. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FhcWJExZcmVqS6r6rEtjis
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.
OTLP Ingest Driver - Design Document
Overview
This document describes the design and implementation of the OTLP (OpenTelemetry Protocol) receiver in ASAP Query Engine. The receiver accepts metrics from OTLP clients (SDKs, OpenTelemetry Collector, test generators) via standard gRPC and HTTP protocols.
Why OtlpReceiver
Based on industry research,
OtlpReceiverwas chosen as the component name.Rationale
Industry Standard: The term "OTLP Receiver" is consistently used across the OpenTelemetry ecosystem:
OpenTelemetry Collector: Official component is called "OTLP Receiver"
receivers: otlp:Prometheus: Uses "receiver" terminology
--web.enable-otlp-receiverVictoriaMetrics: While using "opentelemetry" in package names, their handlers accept/receive OTLP data
app/vmagent/opentelemetryTechnical Documentation: Industry guides consistently use "OTLP receiver"
Alternatives Considered
Architecture
Component Overview
Protocol Support
gRPC (Port 4317)
MetricsService::exportfromopentelemetry_protoExportMetricsServiceRequestExportMetricsServiceResponseHTTP (Port 4318)
POST /v1/metricsExportMetricsServiceRequest{"rejected": 0}Note: The
/v1/metricspath is the OTLP specification default and is auto-appended by the OpenTelemetry Collector. Reference: VictoriaMetrics PR #5871Implementation Details
File Structure
Core Types
Request Processing
Both gRPC and HTTP handlers call
process_otlp_request:Metric Counting
The
otlp_to_record_countfunction traverses the OTLP hierarchy:resource_metrics[]- Metrics grouped by resource (host, service)scope_metrics[]- Metrics grouped by instrumentation scopemetrics[]- Individual metric definitionsdata_points[]- Time series samplesSupported OTLP metric types:
_sum,_count,_bucket)_sum,_count,_scale)_sum,_count, quantile values)Configuration
CLI Flags
Example Usage
With debug logging:
OpenTelemetry Collector Integration
Collector Configuration
To send metrics from an OpenTelemetry Collector to ASAP Query Engine:
Key Points:
host:port(no path)http://host:port(collector auto-appends/v1/metrics)Testing
With otlp_exporter
Expected Debug Output
Dependencies
Added to
asap-query-engine/Cargo.toml:What We Implemented
The OTLP receiver accepts metrics via gRPC (port 4317) and HTTP (port 4318,
POST /v1/metrics). It parsesExportMetricsServiceRequest, counts resource metrics and data points, and logs them at DEBUG level.TODO: Forward received metrics to the precompute engine (handoff point is in code).