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

Feat create new metric explanation #8088

Merged
merged 14 commits into from
May 8, 2024
Merged

Conversation

shimonewman
Copy link
Contributor

No description provided.

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated
Comment on lines 336 to 337
| network.inbound | Sum of network inbound traffic per project |
| network.outbound | Sum of network outbound traffic per project |
Copy link
Member

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 )

CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
CONTRIBUTING.md Outdated Show resolved Hide resolved
shimonewman and others added 10 commits May 7, 2024 20:57
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
Comment on lines 341 to 351
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';
```
Copy link
Member

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';

@christyjacob4 christyjacob4 merged commit 54508c9 into main May 8, 2024
23 checks passed
@christyjacob4 christyjacob4 deleted the feat-create-new-metric-md branch May 8, 2024 16:50
This was referenced May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants