vector/sinks/greptimedb/metrics/mod.rs
1//! `GreptimeDB` grpc sink for vector.
2//!
3//! This sink writes Vector's metric data into
4//! [GreptimeDB](https://github.com/greptimeteam/greptimedb), a cloud-native
5//! time-series database. It uses GreptimeDB's [gRPC
6//! API](https://docs.greptime.com/user-guide/write-data/grpc) and GreptimeDB's
7//! [rust client](https://github.com/GreptimeTeam/greptimedb-ingester-rust).
8//!
9//! This sink transforms metrics into GreptimeDB table using following rules:
10//!
11//! - Table name: `{namespace}_{metric_name}`. If the metric doesn't have a
12//! namespace, we will use metric_name for table name.
13//! - Timestamp: timestamp is stored as a column called `ts`.
14//! - Tags: metric tags are stored as string columns with its name as column
15//! name
16//! - Counter and Gauge: the value of counter and gauge are stored in a column
17//! called `val`
18//! - Set: the number of set items is stored in a column called `val`.
19//! - Distribution, Histogram and Summary, Sketch: Statistical attributes like
20//! `sum`, `count`, "max", "min", quantiles and buckets are stored as columns.
21//!
22
23mod batch;
24mod config;
25#[cfg(all(test, feature = "greptimedb-integration-tests"))]
26mod integration_tests;
27mod request;
28mod request_builder;
29mod service;
30mod sink;