-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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 create new metric explanation #8088
Conversation
CONTRIBUTING.md
Outdated
| network.inbound | Sum of network inbound traffic per project | | ||
| network.outbound | Sum of network outbound traffic per project | |
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.
Also mention the unit of this metric ( like bytes )
Co-authored-by: Christy Jacob <christyjacob4@gmail.com>
Co-authored-by: Christy Jacob <christyjacob4@gmail.com>
Co-authored-by: Christy Jacob <christyjacob4@gmail.com>
Co-authored-by: Christy Jacob <christyjacob4@gmail.com>
Co-authored-by: Christy Jacob <christyjacob4@gmail.com>
Co-authored-by: Christy Jacob <christyjacob4@gmail.com>
Co-authored-by: Christy Jacob <christyjacob4@gmail.com>
CONTRIBUTING.md
Outdated
Metrics are collected within 3 scopes Daily, monthly, an infinity. | ||
Adding new usage metric in order to aggregate usage stats is very simple, but very much dependent on where do you want to collect | ||
statistics ,via API or via background worker. | ||
For both cases you will need to add a const variable in `app/init.php` under the usage metrics list. | ||
|
||
```php | ||
// Usage metrics | ||
const METRIC_FUNCTIONS = 'functions'; | ||
const METRIC_DEPLOYMENTS = 'deployments'; | ||
const METRIC_DEPLOYMENTS_STORAGE = 'deployments.storage'; | ||
``` |
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.
Metrics are collected within 3 scopes Daily, monthly, an infinity. Adding new usage metric in order to aggregate usage stats is very simple, but very much dependent on where do you want to collect
statistics ,via API or via background worker. For both cases you will need to add a const
variable in app/init.php
under the usage metrics list using the naming convention METRIC_<RESOURCE_NAME>
as shown below
// Usage metrics
const METRIC_FUNCTIONS = 'functions';
const METRIC_DEPLOYMENTS = 'deployments';
const METRIC_DEPLOYMENTS_STORAGE = 'deployments.storage';
No description provided.