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
ba3342ba
Commit
ba3342ba
authored
Sep 05, 2016
by
Simen Bekkhus
Committed by
Julius Volz
Sep 05, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add standard exports into the documentation (#529)
Add standard exports into the documentation
parent
860d40bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
6 deletions
+21
-6
writing_clientlibs.md
content/docs/instrumenting/writing_clientlibs.md
+21
-6
No files found.
content/docs/instrumenting/writing_clientlibs.md
View file @
ba3342ba
...
@@ -327,17 +327,32 @@ readable formats) if it can be implemented without a significant resource cost.
...
@@ -327,17 +327,32 @@ readable formats) if it can be implemented without a significant resource cost.
## Standard and runtime collectors
## Standard and runtime collectors
Client libraries SHOULD offer what they can of the Standard exports, documented
Client libraries SHOULD offer what they can of the Standard exports, documented
at
below.
[
https://docs.google.com/document/d/1Q0MXWdwp1mdXCzNRak6bW5LLVylVRXhdi7_21Sg15xQ/edit
](
https://docs.google.com/document/d/1Q0MXWdwp1mdXCzNRak6bW5LLVylVRXhdi7_21Sg15xQ/edit
)
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).
These SHOULD be implemented as custom Collectors, and registered by default on
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
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.
are some very niche use cases where they get in the way.
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 |
|
`process_open_fds`
| Number of open file descriptors. | file descriptors |
|
`process_max_fds`
| Maximum number of open file descriptors. | file descriptors |
|
`process_virtual_memory_bytes`
| Virtual memory size in bytes. | bytes |
|
`process_resident_memory_bytes`
| Resident memory size in bytes. | bytes |
|
`process_heap_bytes`
| Process heap size in bytes. | bytes |
|
`process_start_time_seconds`
| Start time of the process since unix epoch in seconds. | seconds |
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.
## Unit tests
## Unit tests
Client libraries SHOULD have unit tests covering the core instrumentation
Client libraries SHOULD have unit tests covering the core instrumentation
...
...
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