-
Notifications
You must be signed in to change notification settings - Fork 272
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
add metrics tracking the V8 heap usage #5781
Conversation
This comment has been minimized.
This comment has been minimized.
CI performance tests
|
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.
docs LGTM
Co-authored-by: Edward Huang <edward.huang@apollographql.com>
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.
Looks great.
@shorgi Could we look at separately creating some sort of troubleshooting docs that talk about when this is useful?
let current_heap_used_for_gauge = current_heap_used.clone(); | ||
let heap_used_gauge = meter | ||
.u64_observable_gauge("apollo.router.v8.heap.used") | ||
.with_description("V8 heap used, in bytes") |
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.
Could you also set a unit. Sometimes in some apms it's required to display the metrics properly
let current_heap_total_for_gauge = current_heap_total.clone(); | ||
let heap_total_gauge = meter | ||
.u64_observable_gauge("apollo.router.v8.heap.total") | ||
.with_description("V8 heap total, in bytes") |
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.
Same for the unit
let pool_size_gauge = meter_provider() | ||
.meter("apollo/router") | ||
let meter = meter_provider().meter("apollo/router"); | ||
let pool_size_gauge = meter | ||
.u64_observable_gauge("apollo.router.query_planning.queued") |
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.
I know it existed before but could you add description and unit please ?
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.
what kind of unit do we set here? Is there a convention for the expected units in otel?
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.
(asking because I don't see many examples of setting units in our metrics)
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 there are. At different places but for example for memory you can find an example here https://opentelemetry.io/docs/specs/semconv/system/hardware-metrics/#hwmemory---memory-module-metrics and more generally you can take examples from here there are some conventions too
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.
For this on I would suggest using query
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.
done
@bnjjj ok, it's fixed! |
This adds new gauge metrics tracking V8 memory usage:
apollo.router.v8.heap.used
apollo.router.v8.heap.total
This uses code introduced in the router-bridge in apollographql/federation-rs#558
Due to the way we release the router-bridge, this updates the federation version to 2.8.3
ROUTER-671
Checklist
Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.
Exceptions
Note any exceptions here
Notes
Footnotes
It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this. ↩
Configuration is an important part of many changes. Where applicable please try to document configuration examples. ↩
Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions. ↩