Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
docs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
docs
Commits
781c797b
Commit
781c797b
authored
Feb 15, 2017
by
Tobias Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken link to standard process metrics
Also fix a few markdown style issues.
parent
0565e4ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
13 deletions
+15
-13
writing_clientlibs.md
content/docs/instrumenting/writing_clientlibs.md
+15
-13
No files found.
content/docs/instrumenting/writing_clientlibs.md
View file @
781c797b
...
...
@@ -135,8 +135,8 @@ counter. It MUST NOT allow the value to decrease, however it MAY be reset to 0
A counter MUST have the following methods:
-
`inc()`
: Increment the counter by 1
-
`inc(double v)`
: Increment the counter by the given amount. MUST check that v >= 0.
*
`inc()`
: Increment the counter by 1
*
`inc(double v)`
: Increment the counter by the given amount. MUST check that v >= 0.
A counter is ENCOURAGED to have:
...
...
@@ -152,18 +152,18 @@ and down.
A gauge MUST have the following methods:
-
`inc()`
: Increment the gauge by 1
-
`inc(double v)`
: Increment the gauge by the given amount
-
`dec()`
: Decrement the gauge by 1
-
`dec(double v)`
: Decrement the gauge by the given amount
-
`set(double v)`
: Set the gauge to the given value
*
`inc()`
: Increment the gauge by 1
*
`inc(double v)`
: Increment the gauge by the given amount
*
`dec()`
: Decrement the gauge by 1
*
`dec(double v)`
: Decrement the gauge by the given amount
*
`set(double v)`
: Set the gauge to the given value
Gauges MUST start at 0, you MAY offer a way for a given gauge to start at a
different number.
A gauge SHOULD have the following methods:
-
`set_to_current_time()`
: Set the gauge to the current unixtime in seconds.
*
`set_to_current_time()`
: Set the gauge to the current unixtime in seconds.
A gauge is ENCOURAGED to have:
...
...
@@ -189,7 +189,7 @@ quite useful and this MUST be the default.
A summary MUST have the following methods:
-
`observe(double v)`
: Observe the given amount
*
`observe(double v)`
: Observe the given amount
A summary SHOULD have the following methods:
...
...
@@ -218,7 +218,7 @@ Buckets MUST NOT be changeable once the metric is created.
A histogram MUST have the following methods:
-
`observe(double v)`
: Observe the given amount
*
`observe(double v)`
: Observe the given amount
A histogram SHOULD have the following methods:
...
...
@@ -333,12 +333,12 @@ These SHOULD be implemented as custom Collectors, and registered by default on
the default CollectorRegistry. There SHOULD be a way to disable these, as there
are some very niche use cases where they get in the way.
### Process metrics
These exports should have the prefix
`process_`
. If a language or runtime
doesn't expose one of the variables it'd just not export it. All memory values
in bytes, all times in unixtime/seconds.
## Metrics
| Metric name | Help string | Unit |
| ------------------------------- | ------------------------------------------------------ | --------------- |
|
`process_cpu_seconds_total`
| Total user and system CPU time spent in seconds. | seconds |
...
...
@@ -349,9 +349,11 @@ in bytes, all times in unixtime/seconds.
|
`process_heap_bytes`
| Process heap size in bytes. | bytes |
|
`process_start_time_seconds`
| Start time of the process since unix epoch in seconds. | seconds |
### Runtime metrics
In addition, client libraries are ENCOURAGED to also offer whatever makes sense
in terms of metrics for their language’s runtime (e.g. garbage collection
stats), with an appropriate prefix such as
`go_`
,
`hostspot_`
etc.
stats), with an appropriate prefix such as
`go_`
,
`hostspot_`
etc.
## Unit tests
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment