Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dev): decouple syslog source and codec features #18381

Merged
merged 1 commit into from
Aug 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,9 @@ gcp = ["dep:base64", "dep:goauth", "dep:smpl_jwt"]
enrichment-tables = ["enrichment-tables-geoip"]
enrichment-tables-geoip = ["dep:maxminddb"]

# Codecs
codecs-syslog = ["codecs/syslog"]

# Sources
sources = ["sources-logs", "sources-metrics"]
sources-logs = [
Expand Down Expand Up @@ -559,7 +562,7 @@ sources-socket = ["sources-utils-net", "tokio-util/net"]
sources-splunk_hec = ["dep:roaring"]
sources-statsd = ["sources-utils-net", "tokio-util/net"]
sources-stdin = ["tokio-util/io"]
sources-syslog = ["codecs/syslog", "sources-utils-net", "tokio-util/net"]
sources-syslog = ["codecs-syslog", "sources-utils-net", "tokio-util/net"]
sources-utils-http = ["dep:snap", "sources-utils-http-auth", "sources-utils-http-encoding", "sources-utils-http-error", "sources-utils-http-prelude"]
sources-utils-http-auth = ["sources-utils-http-error"]
sources-utils-http-encoding = ["dep:snap", "sources-utils-http-error"]
Expand Down
2 changes: 1 addition & 1 deletion src/components/validation/resources/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ fn deserializer_config_to_serializer(config: &DeserializerConfig) -> encoding::S
// TODO: We need to create an Avro serializer because, certainly, for any source decoding
// the data as Avro, we can't possibly send anything else without the source just
// immediately barfing.
#[cfg(feature = "sources-syslog")]
#[cfg(feature = "codecs-syslog")]
DeserializerConfig::Syslog { .. } => SerializerConfig::Logfmt,
DeserializerConfig::Native => SerializerConfig::Native,
DeserializerConfig::NativeJson { .. } => SerializerConfig::NativeJson,
Expand Down
4 changes: 2 additions & 2 deletions src/sources/datadog_agent/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1658,7 +1658,7 @@ fn test_config_outputs() {
]),
},
),
#[cfg(feature = "sources-syslog")]
#[cfg(feature = "codecs-syslog")]
(
"syslog / single output",
TestCase {
Expand Down Expand Up @@ -1733,7 +1733,7 @@ fn test_config_outputs() {
)]),
},
),
#[cfg(feature = "sources-syslog")]
#[cfg(feature = "codecs-syslog")]
(
"syslog / multiple output",
TestCase {
Expand Down