Skip to content

feat(logging): add an admin dashboard with charts - #866

Draft
josephfusco wants to merge 4 commits into
mainfrom
feat/logging-dashboard
Draft

josephfusco wants to merge 4 commits into
mainfrom
feat/logging-dashboard

Conversation

@josephfusco

@josephfusco josephfusco commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Adds a Dashboard page under GraphQL Logs that charts log entries, errors and top operations over the last 24 hours, 7 days or 30 days.

Closes #452

Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Claude Opus 5.5
Used for: Assisting with building the logging dashboard.

Add a Dashboard submenu under GraphQL Logs that shows, for the last 24 hours, 7 days or 30 days: summary tiles, log entries over time (errors stacked on top), entries by level and the top operations. Aggregation runs in SQL through a new LogStatsInterface with a WordPress database implementation, and results are cached in a short-lived transient. Charts are server-rendered inline SVG with a data table fallback, so no JavaScript or build step is needed.
@josephfusco josephfusco added this to the WPGraphQL Logging Plugin milestone Oct 30, 2026
@josephfusco josephfusco added [Type] Feature A new feature within an existing module [Area] Logging Issues for the WPGraphQL Logging plugin labels Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

📦 Plugin Artifacts Ready!

Download from GitHub Actions run

Available plugins:

  • ✅ wpgraphql-logging.zip

See the "Artifacts" section at the bottom of the Actions run page

…oard

Daily buckets were fixed 24-hour blocks counted from local midnight, so after a daylight saving change the last hour of the day could fall outside the window and labels could slip a day. Daily ranges now use local calendar-day boundaries built from hourly SQL counts. Labels are no longer cached, so each user sees dates in their own locale. Also drops the unvalidated dashboard data filter, which could break the template, and truncates long operation names in the table (full name in the title attribute).
Add wpunit tests for DashboardPage (capability check, menu registration, range validation, DST-aware windows, folding hourly counts into days, caching, custom stats services, escaping of operation names) and for TimeSeriesChart (scale, well-formed accessible SVG, escaping, empty data, label thinning). The e2e spec now sends operationName, because the dashboard groups operations by the name the client sends.
Render the summary tiles from one list and the table bars from one helper. Draw each table bar inside a full-width track so bar lengths stay proportional; previously a max-width cap made large values look the same. Shorten long operation names without stripping characters, so names containing markup are shown escaped rather than blank. Document the dashboard, its filters and how to support it from a custom log store.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Logging Issues for the WPGraphQL Logging plugin [Type] Feature A new feature within an existing module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: Add dashboard to admin for the Logging Plugin

1 participant