This repository has been archived by the owner on Oct 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
Add default metrics supported by OpenCensus system metrics package #258
Open
mayurkale22
wants to merge
3
commits into
census-instrumentation:master
Choose a base branch
from
mayurkale22:system_metrics
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,27 +7,30 @@ TODO: Add list of supported platforms. | |
## Common metrics collection | ||
These are some default metrics supported by OpenCensus system metrics package/contrib. This is to ensure consistency across language implementations, as far as practical. | ||
|
||
| Metric Name | Unit | Type | Description | Labels | | ||
|-------------------------------------------|-------|----------------------------|-----------------------------------------------------------------------------------------------|-----------------| | ||
| system/cpu_seconds/total | s | Int64 Cumulative | Total kernel/system user CPU in seconds. | Hostname, Mode | | ||
| system/processes/created | 1 | Int64 Cumulative | Total number of times a process was created. | Hostname | | ||
| system/processes/running | 1 | Int64 Gauge | Total number of running processes. | Hostname | | ||
| system/disk/total | By | Int64 Gauge | The total available system disk space in bytes. | Hostname, Volume | | ||
| system/disk/used | By | Int64 Gauge | The total used system disk space in bytes. | Hostname, Volume | | ||
| process/heap/total | By | Int64 Gauge | The process's total allocated heap size in bytes. | Hostname | | ||
| process/heap/used | By | Int64 Gauge | The process's total used heap size in bytes. | Hostname | | ||
| process/memory/rss | By | Int64 Gauge | Resident memory size in bytes. | Hostname | | ||
| process/file_descriptor/max | 1 | Int64 Gauge | The maximum limit of file descriptor count. | Hostname | | ||
| process/file_descriptor/open | 1 | Int64 Gauge | The number of open file descriptor count. | Hostname | | ||
| process/start_time | s | Int64 Cumulative | The start time of the process since unix epoch in seconds. | Hostname | | ||
| process/cpu/usage | s | Int64 Cumulative | The total user and system CPU time spent in seconds. | Hostname | | ||
| Metric Name | Unit | Type | Description | Labels | | ||
|-------------------------------------------|-------|----------------------------|--------------------------------------------------------------------|-------------------------| | ||
| system/cpu_seconds/total | s | Int64 Cumulative | Total kernel/system user CPU in seconds. | Hostname, Mode | | ||
| system/processes/created | 1 | Int64 Cumulative | Total number of times a process was created. | Hostname | | ||
| system/processes/running | 1 | Int64 Gauge | Total number of running processes. | Hostname | | ||
| system/processes/blocked | 1 | Int64 Gauge | Total number of blocked processes. | Hostname | | ||
| system/memory/total | By | Int64 Gauge | Total system memory capacity in bytes. | Hostname | | ||
| system/memory/free | By | Int64 Gauge | Total free system memory in bytes. | Hostname | | ||
| system/memory/used | By | Int64 Gauge | Total used system memory in bytes. | Hostname | | ||
| system/disk/total | By | Int64 Gauge | The total available system disk space in bytes. | Hostname, Volume | | ||
| system/disk/used | By | Int64 Gauge | The total used system disk space in bytes. | Hostname, Volume | | ||
| process/memory/rss | By | Int64 Gauge | Resident memory size in bytes. | Hostname | | ||
| process/file_descriptor/max | 1 | Int64 Gauge | The maximum limit of file descriptor count. | Hostname | | ||
| process/file_descriptor/open | 1 | Int64 Gauge | The number of open file descriptor count. | Hostname | | ||
| process/heap/total | By | Int64 Gauge | The process's total allocated heap size in bytes. | Hostname | | ||
| process/heap/used | By | Int64 Gauge | The process's total used heap size in bytes. | Hostname | | ||
| process/cpu/usage | s | Int64 Cumulative | The total user and system CPU time spent in seconds. | Hostname | | ||
|
||
### Labels | ||
The label keys associated with the above metrics. | ||
|
||
| Label Key | Description | | ||
|--------------------|----------------------------------------------------------------------------------------------------------| | ||
| Mode | The amount of time spent by the CPU in state (i.e. `user, nice, system, idle, iowait`). | | ||
| Mode | The amount of time spent by the CPU in state (i.e. `user, nice, system, idle, iowait, stolen`). | | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the label value is related to metric it might be better to put that in the label column rather than here. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Label is a combination of key and description, to avoid unnecessary duplication in metrics table I have added separate table for labels. Let me know if you still want me to change. |
||
| Volume | The path the fs is mounted on (i.e. `/, /data`) | | ||
| Hostname | The hostname of the host (i.e. `opencensus-test`). | | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@rghetia can you add your idea about the idle/total/user label idea?
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.
It is already included here but I would rephrase it differently.
system/cpu_seconds | s | Int64 Cumulative | System CPU in seconds | Hostname, Mode = { total, idle, system, nice, user, iowait, stolen}
Similarly other metrics can be redefined with common metric and possible Label and its values.
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.
Sure, done.