Skip to content
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

Merged
merged 7 commits into from
Apr 6, 2023

Conversation

kmd-fl
Copy link
Contributor

@kmd-fl kmd-fl commented Apr 3, 2023

No description provided.

@kmd-fl kmd-fl changed the title fix(metrics): collect metrics for custom services fix(metrics): collect metrics for custom services [fixes NET-438] Apr 3, 2023
@linear
Copy link

linear bot commented Apr 3, 2023

NET-438 Collect builtin metrics for Custom Services

Essentially, custom services are builtins, but metrics for them aren't collected.

@@ -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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// 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

Comment on lines 142 to 149
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();
Copy link
Member

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?

Copy link
Contributor Author

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
            }
       ...

@kmd-fl kmd-fl added the e2e Run e2e workflow label Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e Run e2e workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants