[core][telemetry/07] support counter metric on worker side#53418
Merged
can-anyscale merged 149 commits intomasterfrom Jun 11, 2025
Merged
[core][telemetry/07] support counter metric on worker side#53418can-anyscale merged 149 commits intomasterfrom
can-anyscale merged 149 commits intomasterfrom
Conversation
fd6ea65 to
6e59b75
Compare
42fbc68 to
1aa6ece
Compare
525e51c to
49066af
Compare
35bccfc to
e3e6fa7
Compare
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
Signed-off-by: can <can@anyscale.com>
<!-- Thank you for your contribution! Please review https://github.com/ray-project/ray/blob/master/CONTRIBUTING.rst before opening a pull request. --> <!-- Please add a reviewer to the assignee section when you create a PR. If you don't have the access to it, we will shortly find a reviewer and assign them to your PR. --> <!-- Please give a short summary of the change and the problem this solves. --> <!-- For example: "Closes #1234" --> - [ ] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [ ] I've run `scripts/format.sh` to lint the changes in this PR. - [ ] I've included any doc changes needed for https://docs.ray.io/en/master/. - [ ] I've added any new APIs to the API Reference. For example, if I added a method in Tune, I've added it in `doc/source/tune/api/` under the corresponding `.rst` file. - [ ] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [ ] Unit tests - [ ] Release tests - [ ] This PR is not tested :( Signed-off-by: can <can@anyscale.com>
<!-- Thank you for your contribution! Please review https://github.com/ray-project/ray/blob/master/CONTRIBUTING.rst before opening a pull request. --> <!-- Please add a reviewer to the assignee section when you create a PR. If you don't have the access to it, we will shortly find a reviewer and assign them to your PR. --> <!-- Please give a short summary of the change and the problem this solves. --> <!-- For example: "Closes #1234" --> - [ ] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [ ] I've run `scripts/format.sh` to lint the changes in this PR. - [ ] I've included any doc changes needed for https://docs.ray.io/en/master/. - [ ] I've added any new APIs to the API Reference. For example, if I added a method in Tune, I've added it in `doc/source/tune/api/` under the corresponding `.rst` file. - [ ] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [ ] Unit tests - [ ] Release tests - [ ] This PR is not tested :( Signed-off-by: can <can@anyscale.com>
<!-- Thank you for your contribution! Please review https://github.com/ray-project/ray/blob/master/CONTRIBUTING.rst before opening a pull request. --> <!-- Please add a reviewer to the assignee section when you create a PR. If you don't have the access to it, we will shortly find a reviewer and assign them to your PR. --> <!-- Please give a short summary of the change and the problem this solves. --> <!-- For example: "Closes #1234" --> - [ ] I've signed off every commit(by using the -s flag, i.e., `git commit -s`) in this PR. - [ ] I've run `scripts/format.sh` to lint the changes in this PR. - [ ] I've included any doc changes needed for https://docs.ray.io/en/master/. - [ ] I've added any new APIs to the API Reference. For example, if I added a method in Tune, I've added it in `doc/source/tune/api/` under the corresponding `.rst` file. - [ ] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/ - Testing Strategy - [ ] Unit tests - [ ] Release tests - [ ] This PR is not tested :( Signed-off-by: can <can@anyscale.com>
dayshah
approved these changes
Jun 11, 2025
|
|
||
| bool IsObservableMetric(const std::string &name) const { | ||
| return observations_by_name_.contains(name); | ||
| } |
Contributor
There was a problem hiding this comment.
in its own function feels excessive if it's just private?
| SetObservableMetricValue(name, std::move(tags), value); | ||
| } else { | ||
| SetSynchronousMetricValue(name, std::move(tags), value); | ||
| } |
Contributor
There was a problem hiding this comment.
why not a ray check, should always be registered before hand right
Contributor
Author
There was a problem hiding this comment.
i moved the existing ray check into the child functions basically
Signed-off-by: can <can@anyscale.com>
MengjinYan
reviewed
Jul 8, 2025
| @@ -63,7 +67,7 @@ class OpenTelemetryMetricRecorder { | |||
| double value); | |||
|
|
|||
| // Get the value of a metric given the tags. | |||
Contributor
There was a problem hiding this comment.
Nit: Need to update the comment
Contributor
Author
There was a problem hiding this comment.
comment is removed in subsequent PR ;)
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is a series of PR to migrate metric collection from opencencus to openlemetry. For context on the existing components, see #53098.
This PR
open_telemetry_metric_recorder.ccopen_telemetry_metric_recorder.pyneeds to be able to consume the counter metric as well, if this part is used. I'll add that in the next PRTest: