feat: Loki remote write (#4941)

* chore: add debug loki remote write url

* chore: add decode snappy

* chore: format output

* feature: impl loki remote write

* fix: special labels deserialize

* chore: move result to folder

* chore: finish todo in loki write

* test: loki write

* chore: fix cr issue

* chore: fix cr issue

* chore: fix cr issue

* chore: update pre-commit config

* chore: fix cr issue

Co-authored-by: dennis zhuang <killme2008@gmail.com>

---------

Co-authored-by: dennis zhuang <killme2008@gmail.com>
This commit is contained in:
shuiyisong
2024-11-18 16:39:17 +08:00
committed by GitHub
parent 2b72e66536
commit c199604ece
28 changed files with 607 additions and 269 deletions

View File

@@ -372,6 +372,7 @@ pub enum Channel {
Grpc = 6,
Influx = 7,
Opentsdb = 8,
Loki = 9,
}
impl From<u32> for Channel {
@@ -385,6 +386,7 @@ impl From<u32> for Channel {
6 => Self::Grpc,
7 => Self::Influx,
8 => Self::Opentsdb,
9 => Self::Loki,
_ => Self::Unknown,
}
@@ -412,6 +414,7 @@ impl Display for Channel {
Channel::Grpc => write!(f, "grpc"),
Channel::Influx => write!(f, "influx"),
Channel::Opentsdb => write!(f, "opentsdb"),
Channel::Loki => write!(f, "loki"),
Channel::Unknown => write!(f, "unknown"),
}
}