spectra-backend-tensorbase
Scale-out TensorBase storage adapter (ClickHouse-compatible native protocol). Enable via the spectra feature tensorbase for remote ingest and multi-node metric/event persistence; implements the TensorBase wire protocol boundary.
Role
TensorBaseMetricsBackendandTensorBaseEventsBackend- Enabled via the
spectrafeaturetensorbase - Uses the official
clickhouseRust client against TensorBase's ClickHouse-compatible TCP/HTTP endpoint - DDL uses
ENGINE = BaseStorage(TensorBase dialect)
Connect
use Arc;
use ;
// Native protocol default port 9528:
let metrics = connect_host.await?;
let events = connect_host.await?;
let _spectra = builder
.metrics_backend
.events_backend
.build?;
// Or explicit URL (prefer tcp+tls:// / https://; plaintext needs SPECTRA_ALLOW_INSECURE_REMOTE=1):
let url = var?;
let metrics = connect.await?;
let events = connect.await?;
let _spectra = builder
.metrics_backend
.events_backend
.build?;
Note: TensorBase upstream is maintenance-only; the trait boundary allows swapping engines without changing emit code.
Runnable
# local plaintext only
See spectra/README.md — How to run examples and repository SECURITY.md.
Integration tests: set SPECTRA_TENSORBASE_URL (and SPECTRA_ALLOW_INSECURE_REMOTE=1 for plaintext) and run cargo test -p spectra-backend-tensorbase -- --ignored.
Status
Shipped in tag v0.1.0. query_aggregate is not yet implemented (returns empty series).