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

Metrics plugin #1650

Closed
pmuens opened this issue Jul 25, 2016 · 10 comments
Closed

Metrics plugin #1650

pmuens opened this issue Jul 25, 2016 · 10 comments
Assignees
Milestone

Comments

@pmuens
Copy link
Contributor

pmuens commented Jul 25, 2016

Makes it possible to get metrics about the service.
The user can see service metrics with the help of the serverless info command.

Metrics:

  • Function runtime
  • Invocations
  • Throttles
  • Errors
  • Percentile

Questions:

  • Is this a global plugin or AWS related? (Do we need both?)
  • Is this service wide of function wide?

What do you guys think @serverless/vip

/cc @flomotlik @eahefnawy

@pmuens pmuens added this to the v1.0.0-beta milestone Jul 25, 2016
@HyperBrain
Copy link
Member

HyperBrain commented Jul 25, 2016

In general I think this is a great idea. Whether it should be global or AWS related depends on the availability of similar metric services in the other providers' infrastructures. If it is not much effort, it can be integrated for AWS only first, and then published via a generic interface later.
How would you return the data? IMHO it should be possible to retrieve it in a human readable format as well as some json structures that can be captured into a file. Also transmitting the edge values for at least the runtime (min, max, sum and average) would be great.
For comparison, see the AWS CLI command for metrics,
With "pricing", do you mean the billed amount of time, or the real credits consumed?

@eahefnawy
Copy link
Member

@HyperBrain probably the "billed amount of time" ... It'll probably depend on AWS API, but not sure how accurate that might end up.

@pmuens
Copy link
Contributor Author

pmuens commented Jul 26, 2016

Thanks for the feedback!

I think I'll create a metrics plugin and another one for AWS which will hook into the metrics:metrics lifecycle (like we've done with the other plugins before).

Additionally I'll use the https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/CloudWatch.html API to get the metrics.

We'll start to display the data in a human readable way on the console. So if the user enters serverless metrics --function hello --stage development --region us-east-1 he'll get all the metrics for the corresponding function.

Like with #1654 we're not supporting service wide metrics in the beginning.

@flomotlik
Copy link
Contributor

Currently thinking if this should be prioritised lower and done at some point in the future. @serverless/vip would you guys want to use this plugin during development? Would providing you these metrics help with development at all?

@erikerikson
Copy link
Member

@flomotlik prioritization would need to be in a context (relative to what?) but my instinct is that this is on the lower priority side. I can see this being useful but a vital needs use case doesn't occur to me off the top of my head.

@pmuens pmuens modified the milestones: v1.0.0-beta, v1.0 Jul 27, 2016
@pmuens pmuens removed their assignment Aug 8, 2016
@flomotlik flomotlik modified the milestones: 1.4, v1.0-ideas, 1.3 Nov 4, 2016
@pmuens pmuens self-assigned this Nov 16, 2016
@pmuens
Copy link
Contributor Author

pmuens commented Nov 17, 2016

Since we're about to implement this soon it would be great to get some feedback on what features this plugin should have / what would be useful for you @serverless/vip

Thanks in advance! 💯 💃

@erikerikson
Copy link
Member

This plugin might be a nice opportunity to create the space in which a "correct means of calculating account region lambda concurrency" might be collected and curated. This is a metric that I know a number of people here would be glad to build some monitoring and automation around.

@RobGruhl
Copy link

I'm less interested in generic metrics and more interested in smart alerting - lambda concurrency, high retries, delays, unusual outlier latencies, increased durations, etc. Also linking outlier metrics to specific logs would be nice.

@RobGruhl
Copy link

We've been using sum of lambda duration as a poor man's lambda concurrency calculation.

@pmuens
Copy link
Contributor Author

pmuens commented Nov 19, 2016

Thanks for the great input! 👍

Really like the idea of setting up alerts as well. Should the plugin do this automatically or should the user take care of that?

@pmuens pmuens changed the title Add Serverless metrics plugin Add metrics to info plugin Nov 25, 2016
@pmuens pmuens changed the title Add metrics to info plugin Metrics plugin Nov 28, 2016
@pmuens pmuens mentioned this issue Nov 29, 2016
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants