-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(vrl): re-enable
parse_dnstap
without VRL playground support (#…
…22124) * chore(vrl): Revert `parse_dnstap` function removal Revert "chore(vrl): Revert add `parse_dnstap` function (#22114)" This reverts commit f3549db. * Remove `dnstap-parser` from VRL playground
- Loading branch information
Showing
25 changed files
with
669 additions
and
43 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Add VRL function `parse_dnstap` that can parse dnstap data and produce output in the same format as `dnstap` source. | ||
|
||
authors: esensar |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[package] | ||
name = "dnstap-parser" | ||
version = "0.1.0" | ||
authors = ["Vector Contributors <vector@datadoghq.com>"] | ||
edition = "2021" | ||
publish = false | ||
license = "MIT" | ||
|
||
[dependencies] | ||
base64 = { version = "0.22.1", default-features = false } | ||
bytes = { version = "1.9.0", default-features = false, features = ["serde"] } | ||
chrono.workspace = true | ||
dnsmsg-parser = { path = "../dnsmsg-parser" } | ||
hickory-proto.workspace = true | ||
prost.workspace = true | ||
snafu.workspace = true | ||
tracing = { version = "0.1.34", default-features = false } | ||
vector-lib = { path = "../vector-lib" } | ||
vrl.workspace = true | ||
|
||
[build-dependencies] | ||
prost-build.workspace = true | ||
|
||
[dev-dependencies] | ||
anyhow.workspace = true | ||
chrono-tz.workspace = true |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
fn main() { | ||
println!("cargo:rerun-if-changed=proto/dnstap.proto"); | ||
let mut prost_build = prost_build::Config::new(); | ||
prost_build.btree_map(["."]); | ||
prost_build | ||
.compile_protos(&["proto/dnstap.proto"], &["proto"]) | ||
.expect("Failed to compile proto files"); | ||
} |
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use tracing::warn; | ||
use vector_lib::internal_event::InternalEvent; | ||
use vector_lib::internal_event::{error_stage, error_type}; | ||
|
||
#[derive(Debug)] | ||
pub(crate) struct DnstapParseWarning<E> { | ||
pub error: E, | ||
} | ||
|
||
impl<E: std::fmt::Display> InternalEvent for DnstapParseWarning<E> { | ||
fn emit(self) { | ||
warn!( | ||
message = "Recoverable error occurred while parsing dnstap data.", | ||
error = %self.error, | ||
stage = error_stage::PROCESSING, | ||
error_type = error_type::PARSER_FAILED, | ||
internal_log_rate_limit = true, | ||
); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#![deny(warnings)] | ||
|
||
use vrl::compiler::Function; | ||
|
||
mod internal_events; | ||
pub mod parser; | ||
pub mod schema; | ||
mod vrl_functions; | ||
|
||
pub fn vrl_functions() -> Vec<Box<dyn Function>> { | ||
vrl_functions::all() | ||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
use vrl::compiler::Function; | ||
|
||
pub mod parse_dnstap; | ||
|
||
pub fn all() -> Vec<Box<dyn Function>> { | ||
vec![Box::new(parse_dnstap::ParseDnstap) as _] | ||
} |
Oops, something went wrong.