-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
enhancement!: Remove default encoding.codec
where appropriate
#5281
Changes from 1 commit
182caf3
7824477
4bee15b
fddc54b
d6f4d2b
5b6cb0f
1225f30
ee985ab
b4fc074
2645669
22fd90e
7c9f5c7
6158a08
455e49c
efef118
1bbd146
93d6ae9
076e7db
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,6 +67,22 @@ where | |
} | ||
} | ||
|
||
#[cfg(any(feature = "sinks-new_relic_logs", feature = "sinks-humio"))] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm a little confused why this type only is used by these two sinks and not the others. Should it be? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it's should be here. Only used in New Relic / Humio because we need to convert There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah! Gotcha, I see. |
||
impl<E> EncodingConfig<E> { | ||
pub(crate) fn into_encoding<X>(self) -> EncodingConfig<X> | ||
where | ||
X: From<E>, | ||
{ | ||
EncodingConfig { | ||
codec: self.codec.into(), | ||
schema: self.schema, | ||
only_fields: self.only_fields, | ||
except_fields: self.except_fields, | ||
timestamp_format: self.timestamp_format, | ||
} | ||
} | ||
} | ||
|
||
impl<E> From<E> for EncodingConfig<E> { | ||
fn from(codec: E) -> Self { | ||
Self { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should add
Text
here as an encoding option.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you okay with adding in another PR? This will not be breaking change because we already removed
Default
forEncoding
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 a separate PR is fine, but it'd be nice to do it before this change is released in a new version as it'd be confusing to require users to specify the
encoding.codec
option when there is only one valid value.