-
Notifications
You must be signed in to change notification settings - Fork 174
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
fix(metrics): collect metrics for custom services [fixes NET-438] #1549
Conversation
NET-438 Collect builtin metrics for Custom Services
Essentially, custom services are builtins, but metrics for them aren't collected. |
3b4708e
to
9b7058e
Compare
@@ -15,7 +15,7 @@ use crate::services_metrics::message::ServiceCallStats; | |||
type ServiceId = String; | |||
type Name = String; | |||
|
|||
/// Store a part of series of numeric observations and some parameters that desribe the series. | |||
/// Store a part of series of numeric observations and some parameters that describes the series. |
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.
/// Store a part of series of numeric observations and some parameters that describes the series. | |
/// Store a part of series of numeric observations and some parameters that describe the series. |
"parameters" is plural
particle-builtins/src/builtins.rs
Outdated
let result = self.builtins_call(args, particle).await; | ||
let result = match result { | ||
FunctionOutcome::NotDefined { args, params } => { | ||
self.custom_service_call(args, params).await | ||
} | ||
result => result, | ||
}; | ||
let end = start.elapsed().as_secs(); |
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.
So it measures builtin+custom service calls?
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.
Yeah, I think the time needed for ensuring the service call isn't in the builtins list isn't significant.
Probrably, can do smth like
let mut start = ...;
....
FunctionOutcome::NotDefined { args, params } => {
start = Instant::now();
self.custom_service_call(args, params).await
}
...
No description provided.