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

Allow an array of sources #213

Open
tomayac opened this issue May 26, 2023 · 1 comment
Open

Allow an array of sources #213

tomayac opened this issue May 26, 2023 · 1 comment
Labels
dx-improvement Suggestions to improve the Developer Experience, e.g. API improvements

Comments

@tomayac
Copy link
Contributor

tomayac commented May 26, 2023

  • Current: observer.observe('thing').
  • Proposal: observer.observe({things: ['thing1', 'thing2']}) (names to be bike-shed).

Similar to PerformanceObserver's entryTpes option.

@zolkis
Copy link

zolkis commented May 31, 2023

It seems that using PressureSource is a good/futureproof design. Currently it supports "cpu" and "thermals", but I guess it might support in the future "memory", "io" ("bus", "network"), "gpu", "psi" etc.

These sources might be independent or not, depending on the situation.

There is a question whether do we want to add sources with sequential API calls, in order to catch specific errors (which on the other hand might be a fingerprinting opportunity), - or to specify a list of sources with one call as suggested above, and control the order of adding the sources by the spec algorithm (or by a policy hint from the user). IMHO the API shape is mainly influenced by what errors we want to capture, when and how.

@kenchris kenchris added the dx-improvement Suggestions to improve the Developer Experience, e.g. API improvements label Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dx-improvement Suggestions to improve the Developer Experience, e.g. API improvements
Projects
None yet
Development

No branches or pull requests

3 participants