mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2025-12-22 22:20:02 +00:00
build: Update Loki proto (#5484)
* build: mv loki-api to loki-proto * fmt: fmt toml * fix: loki-proto using rev --------- Co-authored-by: wangrui <wangrui@baihai.ai>
This commit is contained in:
22
Cargo.lock
generated
22
Cargo.lock
generated
@@ -1053,7 +1053,7 @@ dependencies = [
|
|||||||
"bitflags 2.6.0",
|
"bitflags 2.6.0",
|
||||||
"cexpr",
|
"cexpr",
|
||||||
"clang-sys",
|
"clang-sys",
|
||||||
"itertools 0.13.0",
|
"itertools 0.11.0",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"regex",
|
"regex",
|
||||||
@@ -6128,7 +6128,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4"
|
checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"windows-targets 0.52.6",
|
"windows-targets 0.48.5",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -6264,12 +6264,14 @@ dependencies = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "loki-api"
|
name = "loki-proto"
|
||||||
version = "0.1.2"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/shuiyisong/tracing-loki?branch=chore%2Fprost_version#ad135292a77b6ce638d126571804c19fdaa36215"
|
source = "git+https://github.com/GreptimeTeam/loki-proto.git?rev=1434ecf23a2654025d86188fb5205e7a74b225d3#1434ecf23a2654025d86188fb5205e7a74b225d3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"prost 0.13.3",
|
"prost 0.13.3",
|
||||||
"prost-types 0.13.3",
|
"prost-types 0.13.3",
|
||||||
|
"tonic 0.12.3",
|
||||||
|
"tonic-build 0.12.3",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -8741,7 +8743,7 @@ checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"heck 0.5.0",
|
"heck 0.5.0",
|
||||||
"itertools 0.13.0",
|
"itertools 0.11.0",
|
||||||
"log",
|
"log",
|
||||||
"multimap",
|
"multimap",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
@@ -8787,7 +8789,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5"
|
checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"itertools 0.13.0",
|
"itertools 0.11.0",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.90",
|
"syn 2.0.90",
|
||||||
@@ -10400,7 +10402,7 @@ dependencies = [
|
|||||||
"lazy_static",
|
"lazy_static",
|
||||||
"local-ip-address",
|
"local-ip-address",
|
||||||
"log-query",
|
"log-query",
|
||||||
"loki-api",
|
"loki-proto",
|
||||||
"mime_guess",
|
"mime_guess",
|
||||||
"mysql_async",
|
"mysql_async",
|
||||||
"notify",
|
"notify",
|
||||||
@@ -11773,7 +11775,7 @@ dependencies = [
|
|||||||
"hyper-util",
|
"hyper-util",
|
||||||
"itertools 0.10.5",
|
"itertools 0.10.5",
|
||||||
"log-query",
|
"log-query",
|
||||||
"loki-api",
|
"loki-proto",
|
||||||
"meta-client",
|
"meta-client",
|
||||||
"meta-srv",
|
"meta-srv",
|
||||||
"moka",
|
"moka",
|
||||||
@@ -13248,7 +13250,7 @@ version = "0.1.9"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
|
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.48.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|||||||
@@ -138,7 +138,7 @@ itertools = "0.10"
|
|||||||
jsonb = { git = "https://github.com/databendlabs/jsonb.git", rev = "8c8d2fc294a39f3ff08909d60f718639cfba3875", default-features = false }
|
jsonb = { git = "https://github.com/databendlabs/jsonb.git", rev = "8c8d2fc294a39f3ff08909d60f718639cfba3875", default-features = false }
|
||||||
lazy_static = "1.4"
|
lazy_static = "1.4"
|
||||||
local-ip-address = "0.6"
|
local-ip-address = "0.6"
|
||||||
loki-api = { git = "https://github.com/shuiyisong/tracing-loki", branch = "chore/prost_version" }
|
loki-proto = { git = "https://github.com/GreptimeTeam/loki-proto.git", rev = "1434ecf23a2654025d86188fb5205e7a74b225d3" }
|
||||||
meter-core = { git = "https://github.com/GreptimeTeam/greptime-meter.git", rev = "5618e779cf2bb4755b499c630fba4c35e91898cb" }
|
meter-core = { git = "https://github.com/GreptimeTeam/greptime-meter.git", rev = "5618e779cf2bb4755b499c630fba4c35e91898cb" }
|
||||||
mockall = "0.11.4"
|
mockall = "0.11.4"
|
||||||
moka = "0.12"
|
moka = "0.12"
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ itertools.workspace = true
|
|||||||
jsonb.workspace = true
|
jsonb.workspace = true
|
||||||
lazy_static.workspace = true
|
lazy_static.workspace = true
|
||||||
log-query.workspace = true
|
log-query.workspace = true
|
||||||
loki-api.workspace = true
|
loki-proto.workspace = true
|
||||||
mime_guess = "2.0"
|
mime_guess = "2.0"
|
||||||
notify.workspace = true
|
notify.workspace = true
|
||||||
object-pool = "0.5"
|
object-pool = "0.5"
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ use common_telemetry::{error, warn};
|
|||||||
use hashbrown::HashMap;
|
use hashbrown::HashMap;
|
||||||
use headers::ContentType;
|
use headers::ContentType;
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use loki_api::prost_types::Timestamp;
|
use loki_proto::prost_types::Timestamp;
|
||||||
use prost::Message;
|
use prost::Message;
|
||||||
use quoted_string::test_utils::TestSpec;
|
use quoted_string::test_utils::TestSpec;
|
||||||
use session::context::{Channel, QueryContext};
|
use session::context::{Channel, QueryContext};
|
||||||
@@ -241,7 +241,7 @@ async fn handle_pb_req(
|
|||||||
schemas: &mut Vec<ColumnSchema>,
|
schemas: &mut Vec<ColumnSchema>,
|
||||||
) -> Result<Vec<Vec<GreptimeValue>>> {
|
) -> Result<Vec<Vec<GreptimeValue>>> {
|
||||||
let decompressed = prom_store::snappy_decompress(&bytes).unwrap();
|
let decompressed = prom_store::snappy_decompress(&bytes).unwrap();
|
||||||
let req = loki_api::logproto::PushRequest::decode(&decompressed[..])
|
let req = loki_proto::logproto::PushRequest::decode(&decompressed[..])
|
||||||
.context(DecodeOtlpRequestSnafu)?;
|
.context(DecodeOtlpRequestSnafu)?;
|
||||||
|
|
||||||
let mut column_indexer: HashMap<String, u16> = HashMap::new();
|
let mut column_indexer: HashMap<String, u16> = HashMap::new();
|
||||||
@@ -435,7 +435,7 @@ macro_rules! unwrap_or_warn_continue {
|
|||||||
mod tests {
|
mod tests {
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
use loki_api::prost_types::Timestamp;
|
use loki_proto::prost_types::Timestamp;
|
||||||
|
|
||||||
use crate::error::Error::InvalidLokiLabels;
|
use crate::error::Error::InvalidLokiLabels;
|
||||||
use crate::http::loki::{parse_loki_labels, prost_ts_to_nano};
|
use crate::http::loki::{parse_loki_labels, prost_ts_to_nano};
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ futures.workspace = true
|
|||||||
futures-util.workspace = true
|
futures-util.workspace = true
|
||||||
hyper-util = { workspace = true, features = ["tokio"] }
|
hyper-util = { workspace = true, features = ["tokio"] }
|
||||||
log-query = { workspace = true }
|
log-query = { workspace = true }
|
||||||
loki-api.workspace = true
|
loki-proto.workspace = true
|
||||||
meta-client.workspace = true
|
meta-client.workspace = true
|
||||||
meta-srv = { workspace = true, features = ["mock"] }
|
meta-srv = { workspace = true, features = ["mock"] }
|
||||||
moka.workspace = true
|
moka.workspace = true
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ use common_error::status_code::StatusCode as ErrorCode;
|
|||||||
use flate2::write::GzEncoder;
|
use flate2::write::GzEncoder;
|
||||||
use flate2::Compression;
|
use flate2::Compression;
|
||||||
use log_query::{Context, Limit, LogQuery, TimeFilter};
|
use log_query::{Context, Limit, LogQuery, TimeFilter};
|
||||||
use loki_api::logproto::{EntryAdapter, PushRequest, StreamAdapter};
|
use loki_proto::logproto::{EntryAdapter, PushRequest, StreamAdapter};
|
||||||
use loki_api::prost_types::Timestamp;
|
use loki_proto::prost_types::Timestamp;
|
||||||
use opentelemetry_proto::tonic::collector::logs::v1::ExportLogsServiceRequest;
|
use opentelemetry_proto::tonic::collector::logs::v1::ExportLogsServiceRequest;
|
||||||
use opentelemetry_proto::tonic::collector::metrics::v1::ExportMetricsServiceRequest;
|
use opentelemetry_proto::tonic::collector::metrics::v1::ExportMetricsServiceRequest;
|
||||||
use opentelemetry_proto::tonic::collector::trace::v1::ExportTraceServiceRequest;
|
use opentelemetry_proto::tonic::collector::trace::v1::ExportTraceServiceRequest;
|
||||||
@@ -2027,10 +2027,14 @@ pub async fn test_loki_pb_logs(store_type: StorageType) {
|
|||||||
EntryAdapter {
|
EntryAdapter {
|
||||||
timestamp: Some(Timestamp::from_str("2024-11-07T10:53:50").unwrap()),
|
timestamp: Some(Timestamp::from_str("2024-11-07T10:53:50").unwrap()),
|
||||||
line: "this is a log message".to_string(),
|
line: "this is a log message".to_string(),
|
||||||
|
structured_metadata: vec![],
|
||||||
|
parsed: vec![],
|
||||||
},
|
},
|
||||||
EntryAdapter {
|
EntryAdapter {
|
||||||
timestamp: Some(Timestamp::from_str("2024-11-07T10:53:50").unwrap()),
|
timestamp: Some(Timestamp::from_str("2024-11-07T10:53:50").unwrap()),
|
||||||
line: "this is a log message".to_string(),
|
line: "this is a log message".to_string(),
|
||||||
|
structured_metadata: vec![],
|
||||||
|
parsed: vec![],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
hash: rand::random(),
|
hash: rand::random(),
|
||||||
|
|||||||
Reference in New Issue
Block a user