-
Notifications
You must be signed in to change notification settings - Fork 197
Implement metrics using otel #1885
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
base: main
Are you sure you want to change the base?
Implement metrics using otel #1885
Conversation
I feel like it would be much nicer to have something like: let old_stage_attrs = vec![opentelemetry::KeyValue::new(
nativelink_util::metrics::EXECUTION_STAGE,
old_stage.into(),
)] And then |
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.
Reviewable status: 0 of 1 LGTMs obtained, and 0 of 5 files reviewed, and 3 discussions need to be resolved
nativelink-scheduler/src/memory_awaited_action_db.rs
line 704 at r1 (raw file):
// Record completion metrics if let ActionStage::Completed(action_result) = new_stage { let result_attrs = if action_result.exit_code == 0 {
let result_attrs = vec![opentelemetry::KeyValue::new(
nativelink_util::metrics::EXECUTION_RESULT,
if action_result.exit_code == 0 { ExecutionResult::Success} else { ExecutionResult::Failure },
)]
903b575
to
5ae7d49
Compare
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.
Reviewable status: 0 of 1 LGTMs obtained, and 0 of 5 files reviewed, and 3 discussions need to be resolved
nativelink-scheduler/src/memory_awaited_action_db.rs
line 649 at r1 (raw file):
Previously, chrisstaite-menlo (Chris Staite) wrote…
I feel like it would be much nicer to have something like:
let old_stage_attrs = vec![opentelemetry::KeyValue::new( nativelink_util::metrics::EXECUTION_STAGE, old_stage.into(), )]And then
impl From<ActionStage> for ExecutionStage
if it's not already been done.
I
nativelink-scheduler/src/memory_awaited_action_db.rs
line 704 at r1 (raw file):
Previously, chrisstaite-menlo (Chris Staite) wrote…
let result_attrs = vec![opentelemetry::KeyValue::new( nativelink_util::metrics::EXECUTION_RESULT, if action_result.exit_code == 0 { ExecutionResult::Success} else { ExecutionResult::Failure }, )]
I've also finally fixed this one. Except, the CompletedFromCache
case remains separate since it uses a different condition (checking the ActionStage variant rather than exit code) and maps to ExecutionResult::CacheHit
.
I'm working on the docs. Should be done sometime tonight. |
or tomorrow |
To check the docs you can run: cd web/platform
bun setup
bun docs
rm -r dist && bun run build
bun preview It's a lot of content to review but should help people get started. It's only a basic setup. There's a lot more you can do with the dashboard configs, metrics server/backend (disallowed by our linter) configs, etc. |
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.
@chrisstaite-menlo reviewed 4 of 5 files at r1, 1 of 2 files at r4, 1 of 1 files at r6.
Reviewable status: 0 of 1 LGTMs obtained, and 3 of 17 files reviewed, and 1 discussions need to be resolved
Description
This PR is a continuation of this cache metrics effort, consolidating cache and execution into one PR: #1804
It still may not be adopted.
Fixes # (issue)
Type of change
Please delete options that aren't relevant.
not work as expected)
How Has This Been Tested?
Please also list any relevant details for your test configuration
Checklist
bazel test //...
passes locallygit amend
see some docsThis change is