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

Improvements for the Daily Trace Summary report #68

Closed
bobbingwide opened this issue Apr 23, 2018 · 7 comments
Closed

Improvements for the Daily Trace Summary report #68

bobbingwide opened this issue Apr 23, 2018 · 7 comments

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Apr 23, 2018

The Daily Trace Summary report is currently enabled by selecting the Trace 'shutdown' status report and log in summary file checkbox on the Settings > oik action options admin page.

Creation of the Summary Report is independent of the tracing activity.
See https://www.oik-plugins.com/wordpress-plugins-from-oik-plugins/free-oik-plugins/oik-trace-plugin/settings-oik-action-options/trace-shutdown-status-report-and-log-in-summary-file/

It would be nice to extract/copy this trace_status_report checkbox from the bw_action_options settings group and create a separate admin section for it. This could be a meta box on both the oik trace options and oik action options page so that the user could enable/disable the daily trace summary report from either admin page.

Currently there are three capabilities bundled into one.

  1. Trace a summary report.
  2. Return the summary report to the browser / cli
  3. Append a summary record to the daily summary file
    We could think about splitting these out.

Requirements

  • Split into a separate group of fields called bw_trace_summary
  • Create a meta box for the oik trace options and oik action options pages
  • Consider GDPR

Proposed solution

  • New group to contain trace_status_report
  • No need for a migration routine
  • Implement new meta box as class OIK_trace_summary
@bobbingwide
Copy link
Owner Author

GDPR considerations

The daily trace summary report should only be accessible by authorised users of the output.
It's currently written to a file in ABSPATH.
It needs to be written to a protected directory.

@bobbingwide
Copy link
Owner Author

The option field summary_file will be used to store the prefix of the daily trace summary file, which should include the path. E.g. logs/bwtrace.vt. The date and blog_id ( for Multisite) are appended to create the full file name. E.g. logs/bwtrace.vt.20180516.2 The .htaccess file in the logs folder will protect unauthorised users from accessing the files from the browser.

@bobbingwide
Copy link
Owner Author

See #71 for further details / clarification of the requirements and proposed solution.

@bobbingwide
Copy link
Owner Author

The meta box the for daily trace summary options looks like this.
image

This box is displayed on both oik trace options and oik action options admin pages.
There are PHPUnit tests for the dialog display.

The option field summary_file will be used to store the prefix of the daily trace summary file, which should include the path. E.g. logs/bwtrace.vt.

This has been superceded by the solution in #71
The new solution doesn't support subdirectories.

The .htaccess file in the logs folder will protect unauthorised users from accessing the files from the browser.

I didn't implement any logic to automatically create an .htacess file

This issue can now be closed.

@bobbingwide
Copy link
Owner Author

bobbingwide commented Nov 30, 2019

See also #53 - we’ll add another column to the trace section.

  • trace file
  • trace record count
  • trace errors count
  • Hook count

@bobbingwide
Copy link
Owner Author

#53's closed. I'll close this when I've updated the documentation,
.

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

No branches or pull requests

1 participant