Skip to content
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

[ Breaking Change Request ] Remove support for Metrics from dart:developer #50231

Closed
bkonyi opened this issue Oct 17, 2022 · 21 comments
Closed
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. breaking-change-approved breaking-change-request This tracks requests for feedback on breaking changes library-developer

Comments

@bkonyi
Copy link
Contributor

bkonyi commented Oct 17, 2022

Since the early days of the VM service protocol, the Dart VM has provided APIs for visualizing instantaneous metrics in graphs within Observatory through dart:developer, exposed through the Metrics interface.

Rationale:

This feature has been broken for quite some time in Observatory as we lost the ability to display charts and graphs as a consequence of the Dart 2.0 and null-safety migrations. DevTools also does not currently support displaying metrics, so it seems like a good time to trim an unused API.

Impact:

Deprecating and removing the Metrics APIs should have little to no impact as they haven't worked in quite some time. There's no obvious uses in g3, and there have been no issues filed regarding the broken Observatory functionality in the years since the breakage occurred. There's also no breakages to the VM service protocol as a result of this change, as the existing metrics RPCs are private and were never publicly exposed.

Proposal:
Deprecate Metrics, Metric, Counter, and Gauge, and schedule them for removal in Dart 3.0.

cc @a-siva @kenzieschmoll

@bkonyi bkonyi added the breaking-change-request This tracks requests for feedback on breaking changes label Oct 17, 2022
@sigmundch
Copy link
Member

@bkonyi - I fear this will indirectly break the support we just added in #49062 to expose internal metrics like memory usage and capacity numbers, correct?

Will we offer any alternative to that other than the current logic we use in dart2js? (where we launch a the service protocol and use a vm service client within the process to read this data).

@bkonyi
Copy link
Contributor Author

bkonyi commented Oct 17, 2022

@bkonyi - I fear this will indirectly break the support we just added in #49062 to expose internal metrics like memory usage and capacity numbers, correct?

Will we offer any alternative to that other than the current logic we use in dart2js? (where we launch a the service protocol and use a vm service client within the process to read this data).

No, this shouldn't impact internal memory statistics accessed via the service protocol's private metric RPC. If I recall correctly, we ended up discovering that the native metrics weren't being exposed properly by #49062 anyway since they are defined in native code, not in the Metrics map in dart:developer.

@sigmundch
Copy link
Member

Thanks for clarifying - I thought they had been exposed and that we just didn't get around to convert our logic to use it.

@lrhn lrhn added area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-developer labels Oct 18, 2022
@a-siva
Copy link
Contributor

a-siva commented Oct 18, 2022

//cc @zanderso

@itsjustkevin
Copy link
Contributor

@sigmundch do you feel comfortable with this now that @bkonyi has addressed your concerns?

@sigmundch
Copy link
Member

Yes, thanks for checking. sgtm

@itsjustkevin
Copy link
Contributor

Thanks for the response @sigmundch, with that, @vsmenon, @grouma, @Hixie can you take a look?

@vsmenon
Copy link
Member

vsmenon commented Nov 9, 2022

@a-siva @kenzieschmoll - do you both lgtm?

@a-siva
Copy link
Contributor

a-siva commented Nov 9, 2022

lgtm

@Hixie
Copy link
Contributor

Hixie commented Nov 9, 2022

fine by me since it's already broken anyway. did anyone file a bug asking for it to be fixed?

@kenzieschmoll
Copy link
Contributor

DevTools doesn't use Metrics for anything. LGTM.

@bkonyi
Copy link
Contributor Author

bkonyi commented Nov 28, 2022

@itsjustkevin is it safe to assume this can go forward? :-)

@bkonyi
Copy link
Contributor Author

bkonyi commented Nov 28, 2022

@bkonyi
Copy link
Contributor Author

bkonyi commented Nov 28, 2022

fine by me since it's already broken anyway. did anyone file a bug asking for it to be fixed?

Nope, I don't think anyone really even noticed it was broken in the first place.

@itsjustkevin
Copy link
Contributor

@grouma opinions on this breaking change?

@grouma
Copy link
Member

grouma commented Nov 28, 2022

I'm not aware of any usage from the ACX and or debugging side.

@itsjustkevin
Copy link
Contributor

Thank you @grouma, with that, I think we can approve this breaking change @bkonyi.

copybara-service bot pushed a commit that referenced this issue Nov 28, 2022
See #50231

Change-Id: I8f5196f90dd7a03c08d413d381bf093cc1f309eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/272381
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
@itsjustkevin
Copy link
Contributor

@bkonyi I see this was merged in November and would like to close this, but don't see a changelog entry for this. Am I just missing it?

@bkonyi
Copy link
Contributor Author

bkonyi commented Jan 5, 2023

Hm, thought I had included a changelog entry, but looks like I haven't. I'll add one.

@itsjustkevin
Copy link
Contributor

Thanks @bkonyi! Feel free to close the issue when the changelog entry is added.

@bkonyi bkonyi closed this as completed Jan 6, 2023
@itsjustkevin
Copy link
Contributor

Changelog updated in https://dart-review.googlesource.com/c/sdk/+/278531. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. breaking-change-approved breaking-change-request This tracks requests for feedback on breaking changes library-developer
Projects
None yet
Development

No branches or pull requests

9 participants