Add default metrics supported by OpenCensus system metrics package#258
Add default metrics supported by OpenCensus system metrics package#258mayurkale22 wants to merge 3 commits intocensus-instrumentation:masterfrom
Conversation
metrics/SystemMetrics.md
Outdated
| |-------------------------------------------|-------|----------------------------|-----------------------------------------------------------------------------------------------|-----------------| | ||
| | 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 | |
There was a problem hiding this comment.
add blocked process
system/processes/blocked, 1, Int64 Gauge, Number of processes blocked.
metrics/SystemMetrics.md
Outdated
| | 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 | |
There was a problem hiding this comment.
add memory related stats
system/memory/used
system/memory/total
system/memory/free
all of them are Int64 Gauges.
metrics/SystemMetrics.md
Outdated
| | 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 | |
There was a problem hiding this comment.
This has no meaning. As it will be constant. May be a wall-clock time would be better.
There was a problem hiding this comment.
Good catch, removed. Thx
f5c7ae4 to
bc68109
Compare
metrics/SystemMetrics.md
Outdated
|
|
||
| | Metric Name | Unit | Type | Description | Labels | | ||
| |-------------------------------------------|-------|----------------------------|--------------------------------------------------------------------|-------------------------| | ||
| | system/cpu_seconds/total | s | Int64 Cumulative | Total kernel/system user CPU in seconds. | Hostname, Mode | |
There was a problem hiding this comment.
@rghetia can you add your idea about the idle/total/user label idea?
There was a problem hiding this comment.
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.
metrics/SystemMetrics.md
Outdated
|
|
||
| | Metric Name | Unit | Type | Description | Labels | | ||
| |-------------------------------------------|-------|----------------------------|--------------------------------------------------------------------|-------------------------| | ||
| | system/cpu_seconds/total | s | Int64 Cumulative | Total kernel/system user CPU in seconds. | Hostname, Mode | |
There was a problem hiding this comment.
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.
metrics/SystemMetrics.md
Outdated
| | 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.
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.
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.
This updates: #225