-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Included http middleware to measure the graphql response times using prometheus. #1675
Included http middleware to measure the graphql response times using prometheus. #1675
Conversation
a34ba4c
to
0df72ff
Compare
Prometheus output
HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.TYPE go_gc_duration_seconds summarygo_gc_duration_seconds{quantile="0"} 2.7584e-05 HELP go_goroutines Number of goroutines that currently exist.TYPE go_goroutines gaugego_goroutines 11 HELP go_info Information about the Go environment.TYPE go_info gaugego_info{version="go1.21.5"} 1 HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.TYPE go_memstats_alloc_bytes gaugego_memstats_alloc_bytes 1.03563256e+08 HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.TYPE go_memstats_alloc_bytes_total countergo_memstats_alloc_bytes_total 4.435398656e+09 HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.TYPE go_memstats_buck_hash_sys_bytes gaugego_memstats_buck_hash_sys_bytes 7465 HELP go_memstats_frees_total Total number of frees.TYPE go_memstats_frees_total countergo_memstats_frees_total 9.7048269e+07 HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.TYPE go_memstats_gc_sys_bytes gaugego_memstats_gc_sys_bytes 8.689704e+06 HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.TYPE go_memstats_heap_alloc_bytes gaugego_memstats_heap_alloc_bytes 1.03563256e+08 HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.TYPE go_memstats_heap_idle_bytes gaugego_memstats_heap_idle_bytes 5.8810368e+07 HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use.TYPE go_memstats_heap_inuse_bytes gaugego_memstats_heap_inuse_bytes 1.41729792e+08 HELP go_memstats_heap_objects Number of allocated objects.TYPE go_memstats_heap_objects gaugego_memstats_heap_objects 1.349244e+06 HELP go_memstats_heap_released_bytes Number of heap bytes released to OS.TYPE go_memstats_heap_released_bytes gaugego_memstats_heap_released_bytes 4.2016768e+07 HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system.TYPE go_memstats_heap_sys_bytes gaugego_memstats_heap_sys_bytes 2.0054016e+08 HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.TYPE go_memstats_last_gc_time_seconds gaugego_memstats_last_gc_time_seconds 1.706568490173922e+09 HELP go_memstats_lookups_total Total number of pointer lookups.TYPE go_memstats_lookups_total countergo_memstats_lookups_total 0 HELP go_memstats_mallocs_total Total number of mallocs.TYPE go_memstats_mallocs_total countergo_memstats_mallocs_total 9.8397513e+07 HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.TYPE go_memstats_mcache_inuse_bytes gaugego_memstats_mcache_inuse_bytes 9600 HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.TYPE go_memstats_mcache_sys_bytes gaugego_memstats_mcache_sys_bytes 15600 HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.TYPE go_memstats_mspan_inuse_bytes gaugego_memstats_mspan_inuse_bytes 2.24784e+06 HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.TYPE go_memstats_mspan_sys_bytes gaugego_memstats_mspan_sys_bytes 2.819208e+06 HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.TYPE go_memstats_next_gc_bytes gaugego_memstats_next_gc_bytes 2.05939728e+08 HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations.TYPE go_memstats_other_sys_bytes gaugego_memstats_other_sys_bytes 1.404263e+06 HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.TYPE go_memstats_stack_inuse_bytes gaugego_memstats_stack_inuse_bytes 786432 HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.TYPE go_memstats_stack_sys_bytes gaugego_memstats_stack_sys_bytes 786432 HELP go_memstats_sys_bytes Number of bytes obtained from system.TYPE go_memstats_sys_bytes gaugego_memstats_sys_bytes 2.14262832e+08 HELP go_threads Number of OS threads created.TYPE go_threads gaugego_threads 15 HELP guacgql_http_server_request_duration_seconds Histogram of response time for handler in secondsTYPE guacgql_http_server_request_duration_seconds histogramguacgql_http_server_request_duration_seconds_bucket{method="POST",route="CertifyLegalPkgs",status_code="200",le="0.005"} 22 |
0df72ff
to
77c90dd
Compare
77c90dd
to
0d5714a
Compare
@sunnyyip would like your input on this!! |
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.
LGTM
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.
small nit, LTGM
0d5714a
to
7f72e41
Compare
- Included http handler for measuring graphql Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com>
7f72e41
to
e398eef
Compare
All looks good...the only comment I have is that we should probably use millisecond as unit for response time metric. |
Description of the PR
PR Checklist
-s
flag togit commit
.make generate
has been runcollectsub
protobuf has been changed,make proto
has been run