This repository has been archived by the owner on Jun 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Add a prometheus exporter #57
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
78a194b
run: add a prometheus exporter
JulienBalestra 5db6478
Move the state creation to the NewRunner function, it avoid any panics
JulienBalestra fe955d2
readme: link the metrics
JulienBalestra 8bff2bf
metrics: fix the metric help
JulienBalestra 75c935e
docs: remove extra line
JulienBalestra 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name,type,help | ||
"go_gc_duration_seconds","SUMMARY","A summary of the GC invocation durations." | ||
"go_goroutines","GAUGE","Number of goroutines that currently exist." | ||
"go_memstats_alloc_bytes","GAUGE","Number of bytes allocated and still in use." | ||
"go_memstats_alloc_bytes_total","COUNTER","Total number of bytes allocated, even if freed." | ||
"go_memstats_buck_hash_sys_bytes","GAUGE","Number of bytes used by the profiling bucket hash table." | ||
"go_memstats_frees_total","COUNTER","Total number of frees." | ||
"go_memstats_gc_sys_bytes","GAUGE","Number of bytes used for garbage collection system metadata." | ||
"go_memstats_heap_alloc_bytes","GAUGE","Number of heap bytes allocated and still in use." | ||
"go_memstats_heap_idle_bytes","GAUGE","Number of heap bytes waiting to be used." | ||
"go_memstats_heap_inuse_bytes","GAUGE","Number of heap bytes that are in use." | ||
"go_memstats_heap_objects","GAUGE","Number of allocated objects." | ||
"go_memstats_heap_released_bytes_total","COUNTER","Total number of heap bytes released to OS." | ||
"go_memstats_heap_sys_bytes","GAUGE","Number of heap bytes obtained from system." | ||
"go_memstats_last_gc_time_seconds","GAUGE","Number of seconds since 1970 of last garbage collection." | ||
"go_memstats_lookups_total","COUNTER","Total number of pointer lookups." | ||
"go_memstats_mallocs_total","COUNTER","Total number of mallocs." | ||
"go_memstats_mcache_inuse_bytes","GAUGE","Number of bytes in use by mcache structures." | ||
"go_memstats_mcache_sys_bytes","GAUGE","Number of bytes used for mcache structures obtained from system." | ||
"go_memstats_mspan_inuse_bytes","GAUGE","Number of bytes in use by mspan structures." | ||
"go_memstats_mspan_sys_bytes","GAUGE","Number of bytes used for mspan structures obtained from system." | ||
"go_memstats_next_gc_bytes","GAUGE","Number of heap bytes when next garbage collection will take place." | ||
"go_memstats_other_sys_bytes","GAUGE","Number of bytes used for other system allocations." | ||
"go_memstats_stack_inuse_bytes","GAUGE","Number of bytes in use by the stack allocator." | ||
"go_memstats_stack_sys_bytes","GAUGE","Number of bytes obtained from system for stack allocator." | ||
"go_memstats_sys_bytes","GAUGE","Number of bytes obtained by system. Sum of all system allocations." | ||
"process_cpu_seconds_total","COUNTER","Total user and system CPU time spent in seconds." | ||
"process_max_fds","GAUGE","Maximum number of open file descriptors." | ||
"process_open_fds","GAUGE","Number of open file descriptors." | ||
"process_resident_memory_bytes","GAUGE","Resident memory size in bytes." | ||
"process_start_time_seconds","GAUGE","Start time of the process since unix epoch in seconds." | ||
"process_virtual_memory_bytes","GAUGE","Virtual memory size in bytes." | ||
"pupernetes_kubelet_api_pods_running","GAUGE","Number of kubelet API pods running" | ||
"pupernetes_kubelet_logs_pods_running","GAUGE","Number of kubelet logs pods running" | ||
"pupernetes_kubelet_probe_failures","COUNTER","Total number of kubelet probe failures" | ||
"pupernetes_ready","GAUGE","Boolean for pupernetes readiness" | ||
"pupernetes_version","GAUGE","Pupernetes version" |
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
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package run | ||
package state | ||
|
||
import ( | ||
"os" | ||
|
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
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
Oops, something went wrong.
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.
you could remove the
error
fromNewState
and useMustRegister
instead ofRegister
which would make the program panic if failing, this would clean up all the error handling code as wellThere 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.
@mfpierre I wasn't sure about that, do you think it worth it ?
Why panic should be better than an error ?
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.
Don't you exit anyway if it fails?
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.
Yes but a panic in the middle of my code path sounds weird to me. Don't you think ?