-
Notifications
You must be signed in to change notification settings - Fork 113
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: add sdk infomation metrics #2208
base: main
Are you sure you want to change the base?
Conversation
whynowy
commented
Nov 6, 2024
Signed-off-by: Derek Wang <[email protected]>
Signed-off-by: Derek Wang <[email protected]>
Signed-off-by: Derek Wang <[email protected]>
Signed-off-by: Derek Wang <[email protected]>
@@ -18,6 +18,17 @@ use crate::shared::server_info::version::SdkConstraints; | |||
// Equivalent to U+005C__END__. | |||
const END: &str = "U+005C__END__"; | |||
|
|||
pub const CONTAINER_TYPE_SOURCER: &str = "sourcer"; |
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.
What is the best way to do this in rust?
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.
Enum?
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.
Enum with string? Not seems to 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.
Do you want something like this?
#2020
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.
Constant seems to be simpler for this specific use case.
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.
idiomatic rust is to use enum and impl std::fmt::Display
for getting the string version string.
do we need extra pipeline and vertex name dimensions? one pipeline can have multiple vertices using different SDK versions |
And just curious, what is the main use case of introducing this metric? |
This can be used to know what are the sdk versions being in use, to help identify what version of controller can be upgraded, assume we would have a backward compatibility mapping for the controller and sdks. |
No need for that I think. |
Signed-off-by: Derek Wang <[email protected]>
Signed-off-by: Derek Wang <[email protected]>
rust/numaflow-core/src/metrics.rs
Outdated
// forward_metrics_labels is a helper function used to fetch the | ||
// SDK_INFO_LABELS object |
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.
wrong comment?
_ = sdk_server_info(ud_transformer.socket_path.clone().into(), cln_token.clone()) | ||
.await?; |
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.
_ = sdk_server_info(ud_transformer.socket_path.clone().into(), cln_token.clone()) | |
.await?; | |
_ = sdk_server_info(ud_transformer.socket_path.clone().into(), cln_token.clone()) | |
.await?; |
do we need this change?
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.
Do we need to handle the return in rust? Also, I assume something needs to be added for the returned server info later on - this is for pipeline.
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.
?
does the return on error. the success is a zero-size-type ()
which has no meaning.
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 success is changed to ServerInfo.
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.
then it is fine, i missed that
@@ -18,6 +18,17 @@ use crate::shared::server_info::version::SdkConstraints; | |||
// Equivalent to U+005C__END__. | |||
const END: &str = "U+005C__END__"; | |||
|
|||
pub const CONTAINER_TYPE_SOURCER: &str = "sourcer"; |
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.
idiomatic rust is to use enum and impl std::fmt::Display
for getting the string version string.
_ = sdk_server_info(ud_config.server_info_path.clone().into(), cln_token.clone()) | ||
.await?; |
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.
any reason for this change?
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.
Same reason as the other one.
Signed-off-by: Derek Wang <[email protected]>