Repository navigation
docs(observability): store every OTLP metric in one table and query it with time-series functions - #2386
Merged
Conversation
…t with time-series functions
Contributor
✅ Pull with Spice PassedPassing checks:
|
Contributor
🔍 Pull with Spice FailedPassing checks:
Failed checks:
Please address these issues and update your pull request. |
3 similar comments
Contributor
🔍 Pull with Spice FailedPassing checks:
Failed checks:
Please address these issues and update your pull request. |
Contributor
🔍 Pull with Spice FailedPassing checks:
Failed checks:
Please address these issues and update your pull request. |
Contributor
🔍 Pull with Spice FailedPassing checks:
Failed checks:
Please address these issues and update your pull request. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The Collector example references an undefined receiver and fails configuration validation as written.
1 open finding
What changed in this PR
Documents the new OTLP metrics store alongside existing per-metric ingestion in the unversioned documentation.
Changes:
- Describes gRPC and HTTP ingestion with a Collector example.
- Adds metrics store configuration, schema, export behavior, and SQL examples.
- Groups existing documentation under “Per-metric datasets” while preserving anchors.
| File | Description |
|---|---|
website/docs/features/data-ingestion/index.md |
Documents metrics storage, ingestion, and time-series queries. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
|
🚀 deployed to https://bdc181d4.spiceai-org-website.pages.dev |
Contributor
|
🚀 deployed to https://514cd835.spiceai-org-website.pages.dev |
This branch was successfully deployed
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.

spiceai/spiceai#15066 added a metrics store: a
sink:dataset withparams.otlp_metrics: allreceives every OTLP metric in one table with a fixed schema, including exponential histograms and summaries. The PR also added an OTLP/HTTP receiver atPOST /v1/metricsand three SQL aggregates for metrics:histogram_quantile,increase, andrate. Before this change, the Data Ingestion page described only per-metric datasets (one dataset per metric name, with a column per attribute) received over gRPC.The new sections sit beside the OTLP logs docs in #2378 without touching the same lines.
git apply --checkof the #2378 diff on top of this branch applies cleanly.Pages changed
website/docs/features/data-ingestion/index.md: the OpenTelemetry section now introduces both kinds of dataset and adds "Sending metrics" (gRPC andPOST /v1/metrics, with a Collectorotlphttpexample), "Metrics store" (configuration, export outcomes, schema, and querying withhistogram_quantile,increase, andrate), and a "Per-metric datasets" heading. The existing per-metric subsections move under that heading one level down. Their heading text, and so their anchors, are unchanged.Versioned docs
vNext only. The merge commit
d836f804is in no release tag (git tag --containsreturns nothing), not inv2.4.0-rc.1orv2.4.0-rc.2, andopentelemetry_store.rsis not onrelease/2.4. Versioned docs are unchanged.Verification
Trunk SHA
9a25991b0384c7fc6b25fc838d6d71ce6f65ea57.otlp_metricswith valueall:pub const OTLP_METRICS_PARAM: &str = "otlp_metrics";(crates/runtime/src/opentelemetry_store.rs:49)METRICS_STORE_SCHEMA, for exampleField::new("series_hash", DataType::UInt64, false),(crates/runtime/src/opentelemetry_store.rs:75)metric_typevalues include"exponential_histogram",(crates/runtime/src/opentelemetry_store.rs:596). Sums, histograms, and exponential histograms carry temporality, and only sums carryis_monotonic(crates/runtime/src/opentelemetry_store.rs:583-601).pub const HISTOGRAM_QUANTILE_UDAF_NAME: &str = "histogram_quantile";(crates/runtime-datafusion-udfs/src/timeseries.rs:40), with"increase"and"rate"defined at lines 41 and 42.pub(crate) const METRICS_PATH: &str = "/v1/metrics";(crates/runtime/src/http/v1/otlp.rs:49), and the limit ispub(crate) const MAX_DECOMPRESSED_BODY_BYTES: u64 = 128 * 1024 * 1024;(crates/runtime/src/http/v1/otlp.rs:137)"Failed to write to the OpenTelemetry metrics store; retry the export",(crates/runtime/src/opentelemetry.rs:256)"OpenTelemetry metrics store dataset {} is not writable. Set \access: read_write` on it to store metrics.",` (crates/runtime/src/opentelemetry.rs:341)opentelemetry::testsin the source PR's CI: feat: store and query OTLP metrics as time series spiceai#15066histogram_quantilematches hand-computed Prometheus values and rejects mixed bucket layouts, andincrease/ratehandle counter resets and integer counters. This comes from thetimeseries::testsin the source PR: feat: store and query OTLP metrics as time series spiceai#15066UNAVAILABLE/ HTTP503after the per-metric fallback, read-only keys get403onPOST /v1/metrics, and a(time_unix_nano, series_hash)primary key on Cayenne stores a retried export once. No spiced build containing this change was run, and the installed release binary predates it.date_binwithhistogram_quantile, andrategrouped byseries_hash) and the Collectorotlphttpexample were not executed. The Collector example defines itsotlpreceiver (added in review); it was checked against the Collector configuration reference, not validated with a Collector binary.npm run buildinwebsite/passed locally ([SUCCESS] Generated static files in "build"., exit 0; no broken links or anchors reported)