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(mongodb_metrics source): Initial implementation #4500
Conversation
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
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.
This is looking good! It was very easy to follow.
Nothing blocking, but I'm particularly interested in the usage of Arc
over &self
in the collector.
mod types; | ||
use types::{CommandBuildInfo, CommandIsMaster, CommandServerStatus, NodeType}; | ||
|
||
macro_rules! tags { |
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 feel like we have this macro in a couple of places now, maybe we could pull it up into event
?
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 had seen that almost same macro defined in apache_metrics/parser.js
.. somewhere else?
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.
They aren't all exactly the same, but I think they could be unified:
I see identical or very similar macros in:
- src/sources/prometheus/parser.rs
- src/sources/host_metrics.rs
- src/sources/apache_metrics/parser.rs
- lib/prometheus-parser/src/line.rs
- src/mapping/query/function/parse_url.rs
Definitely not blocking for this PR, but if you are feeling ambitious it'd be nice to extract and unify them 😄
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.
Thanks for the list! Let's create an issue after this pull request.
|
||
#[derive(Debug, Deserialize)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct CommandServerStatusWiredTiger { |
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 wonder if we could have had some sort of strategy to isolate the metrics in https://github.com/timberio/vector/pull/4500/files#r506717666 grouped up here so it was easier to audit?
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
/// See URL components at https://docs.mongodb.com/manual/reference/connection-string/#components | ||
fn sanitize_endpoint(endpoint: &str, options: &ClientOptions) -> String { | ||
let mut endpoint = endpoint.to_owned(); | ||
if options.credential.is_some() { |
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.
You said to me we can't use Url::parse
here, can we leave a note about why not?
Signed-off-by: Kirill Fomichev <fanatid@ya.ru>
Signed-off-by: Kirill Fomichev <fanatid@ya.ru> Signed-off-by: Brian Menges <brian.menges@anaplan.com>
Closes #3093
TODO:
mongos
test (not in this PR)(not in this PR)afbc347tags!
macro (feat(mongodb_metrics source): Initial implementation #4500 (comment))mongodb_source
meta to.github
Implemented metrics