-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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(new sink): Initial influxdb_metrics
sink implementation
#1759
feat(new sink): Initial influxdb_metrics
sink implementation
#1759
Conversation
ff7f71c
to
73a21a5
Compare
I added a documentation so the pull request is ready to review. |
Thanks! We'll have @a-rodin review this week. |
@bednar I know Influx has support for ingesting logs, right? Would it make sense to follow this up with an |
influx_metrics
sink implementation
influx_metrics
sink implementationinfluxdb_metrics
sink implementation
46c2d53
to
7ef890b
Compare
@binarylogic I think a preferred way is transform logs to metrics and push these metrics into InfluxDB. |
use tower::Service; | ||
|
||
pub enum Field { | ||
/// string |
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 these are very unnecessary doc comments.
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.
Comments removed
/// float | ||
Float(f64), | ||
/// unsigned integer | ||
UnsignedInt(u32), |
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.
It seems like these should be 64 bit? https://v2.docs.influxdata.com/v2.0/reference/syntax/line-protocol/#uinteger
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.
It's u32
because is used in MetricValue
- https://github.com/timberio/vector/blob/61f9f3356bfdc266d6841d42344dd5dee194b766/src/event/metric.rs#L24
use std::collections::{BTreeMap, HashMap}; | ||
use tower::Service; | ||
|
||
pub enum Field { |
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.
Seems like this should include the other types listed on https://v2.docs.influxdata.com/v2.0/reference/syntax/line-protocol/#data-types-and-format ?
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 that other types are unnecessary, but Field
is useful for extending in future.
let mut res = client | ||
.post("http://localhost:9999/api/v2/query?org=my-org") | ||
.json(&body) | ||
.header("accept", "application/json") |
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.
.header("accept", "application/json") | |
.header("Accept", "application/json") |
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.
Done
@bednar Are you planning to add #1759 (comment) as part of this PR? If not, it is fine, we can merge it as it is and then add support for v1.x later if necessary. |
@a-rodin I am currently works on it. I hope so that today i fix code and at Monday documentation for that. |
Can wait to see this merged, thanks for the work |
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.
The code looks good to me now. After the docs are updated, this can be merged.
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
…ring in URL, rename host to endpoint, unsigned int serialized as '*u', InfluxDB start with disabled reporting Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
Signed-off-by: Jakub Bednar <jakub.bednar@gmail.com>
1e8d1b1
to
4604033
Compare
Conflict with master is resolved |
@bednar great! Could you give me permission to push to your branch? I'd like to make some documentation changes and then we can merge. |
@binarylogic Awesome information! Permission granted ;) |
Thanks @bednar! Appreciate the attention to detail and clean commits. Let us know if you'd be interested in working on anything else! |
Thanks guys for cooperation! @binarylogic @a-rodin |
@bednar I'm curious if you'd be interested in working on other Vector components? Feel free to email me if you are -- ben@timber.io. |
Closes #562
There is also a work to do, but I hope so that is a good start point to accept PR
TODO: