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

Aggregated server-side logging #75

Open
mindplay-dk opened this issue Sep 10, 2018 · 2 comments
Open

Aggregated server-side logging #75

mindplay-dk opened this issue Sep 10, 2018 · 2 comments

Comments

@mindplay-dk
Copy link

I'd like to propose adding support for optional server-side aggregation of the logs.

I'd suggest a very simple addition to the extension.

It currently looks for the data embedded in the x-chromelogger-data.

I'm proposing an alternative header x-chromelogger-url, which would instead provide a URL, from which the client can fetch the server-side logs with a subsequent GET request for the same JSON data.

This would enable server-side implementations to store data in temp-files (or a cache, etc.) and expose server-side logs of any arbitrary size.

I would immediately add support for this to kodus/chrome-logger, which (like some implementations on other platforms) is middleware-based, making it very easy for a developer to bootstrap the logger with a single component.

This would address issues like #40 and #61, which apparently are all too common.

The default header-size limit in NGINX, for example, is much too low for ChromeLogger to be of any real use - even if we try to document our way around these issues, header-size limitations apparently exist in all sort of server-software, and developers and sys-admins usually need to debug this the hard way. It's a considerable waste of time.

Most of the server-side implementations address the header-size limitation in Chrome by introducing a ~240K limit on the size of the emitted header. That's not a good work-around, because (1) you can't be certain that other headers don't grow beyond the remaining ~16K that's left over, and (2) in some debugging scenarios you actually need the full log-data, e.g. when you need a log-entry generated near the beginning and near the end of the same request.

@ccampbell let me know if you'd accept a PR?

@mindplay-dk
Copy link
Author

I see now that this was actually implemented in '14 in #52.

I'd like to redo it using today's APIs though, and that PR is probably too old to merge anyhow.

@mindplay-dk
Copy link
Author

@ccampbell are you there?

I'd like to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant