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

Collections: better logging for chunking APIs #825

Open
josephjclark opened this issue Nov 15, 2024 · 0 comments
Open

Collections: better logging for chunking APIs #825

josephjclark opened this issue Nov 15, 2024 · 0 comments

Comments

@josephjclark
Copy link
Collaborator

When we set(), we get logs like this:

ADA Collections: uploading batch of 1000 values to "nh-demo"...
ADA Collections: set 1000 values in "nh-demo"
ADA Collections: uploading batch of 1000 values to "nh-demo"...
ADA Collections: set 1000 values in "nh-demo"

And when we get(), logs are like:

ADA Collections: fetched chunk of 1000 values from "nh-demo"
ADA Collections: fetched chunk of 1000 values from "nh-demo"
ADA Collections: fetched chunk of 643 values from "nh-demo"

In both cases, we should find a way to neatly log the chunk and the total.

It looks a bit weird if we only get one chunk to do this:

ADA Collections: fetched chunk of 165 values from "nh-demo"
ADA Collections: fetched 165 values from "nh-demo"

So either we:

  • Only log chunks if we need to (which is just a bit of fiddly code). This results in inconsistent logging
  • console.debug the chunks and console.log the results. But a) Adaptor debug logs are weird kit#815 and b) lightning doesn't render debug any differnetly to info, so there's not much of a net gain for the user.

I could also not log the chunks, but its nice to see signs of life during big uploads.

Yet another option would be logs like

ADA Collections: fetched 1000 of 1643  values from "nh-demo"
ADA Collections: fetched 1643 of 1643 values from "nh-demo"

But maybe that's still kind weird

@github-project-automation github-project-automation bot moved this to New Issues in v2 Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: New Issues
Development

No branches or pull requests

1 participant