Skip to content

Add NodeDiagnostics monitoring plugin#1078

Open
Jim8y wants to merge 14 commits into
neo-project:master-n3from
Jim8y:feature/node-ops-plugin
Open

Add NodeDiagnostics monitoring plugin#1078
Jim8y wants to merge 14 commits into
neo-project:master-n3from
Jim8y:feature/node-ops-plugin

Conversation

@Jim8y

@Jim8y Jim8y commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add the NodeDiagnostics plugin for node diagnostics telemetry, crash reporting, node liveness heartbeats, consensus stall alerts, and exception notifications.
  • Capture unhandled exceptions and unobserved task exceptions, with immediate bounded flushing for fatal events.
  • Report ConsensusStall error events when the local block height does not advance for ConsensusStallThresholdSeconds seconds; the default threshold is 30 seconds.
  • Publish process-level heartbeat checks through Better Stack and Healthchecks-compatible URLs.
  • Publish node-level liveness payloads through webhook-compatible status sinks, including block height, header height, and seconds since the local block height last advanced.
  • Support configurable sinks for custom webhooks, experimental Sentry-shaped payloads, experimental Google Cloud Error Reporting payloads, Better Stack heartbeats, and Healthchecks heartbeats.
  • Allow operators to configure endpoints, tokens, token headers, custom headers, heartbeat intervals, consensus stall threshold, severity thresholds, retries, request timeouts, queue limits, payload truncation limits, and operator tags.
  • Enforce HTTPS for token-bearing endpoints and keep tokens out of logs.
  • Add an optional startup diagnostic event so operators can validate endpoint, token, header, and payload settings during rollout.
  • Add operator-facing documentation with supported providers, sample configuration, security guidance for tokens, rollout validation, provider notes, and node liveness behavior.
  • Improve reliability with per-request timeouts, bounded queue drop warnings, retry controls, a User-Agent header, bounded worker shutdown, one alert per stalled height, and focused tests for timeout/configuration/payload behavior.
  • Rename plugin files, directories, namespaces, configuration file, and test project from NodeOps to NodeDiagnostics.

Validation

  • dotnet format --no-restore --verify-no-changes --verbosity diagnostic
  • dotnet test tests/Neo.Plugins.NodeDiagnostics.Tests/Neo.Plugins.NodeDiagnostics.Tests.csproj (20 passed)
  • dotnet build neo-node.sln

Note: solution build reports existing NU1903 warnings for SQLitePCLRaw.lib.e_sqlite3 in SQLiteWallet projects.

@github-actions github-actions Bot added the N3 label Jun 19, 2026
@Jim8y Jim8y changed the title Add NodeOps monitoring plugin Add NodeDiagnostics monitoring plugin Jun 19, 2026
@codecov

codecov Bot commented Jun 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.55405% with 297 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.16%. Comparing base (f3eb4aa) to head (f2c19c7).

Files with missing lines Patch % Lines
...ugins/NodeDiagnostics/NodeDiagnosticsDispatcher.cs 63.61% 105 Missing and 22 partials ⚠️
plugins/NodeDiagnostics/NodeDiagnosticsPlugin.cs 0.00% 82 Missing ⚠️
plugins/NodeDiagnostics/NodeDiagnosticsEvent.cs 77.94% 32 Missing and 13 partials ⚠️
plugins/NodeDiagnostics/NodeDiagnosticsSettings.cs 82.99% 12 Missing and 13 partials ⚠️
...ins/NodeDiagnostics/NodeDiagnosticsSinkSettings.cs 83.01% 6 Missing and 12 partials ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           master-n3    #1078      +/-   ##
=============================================
+ Coverage      50.33%   51.16%   +0.82%     
=============================================
  Files            280      285       +5     
  Lines          16500    17388     +888     
  Branches        2137     2257     +120     
=============================================
+ Hits            8305     8896     +591     
- Misses          7632     7869     +237     
- Partials         563      623      +60     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Jim8y Jim8y requested a review from shargon June 24, 2026 03:14
Comment thread plugins/NodeDiagnostics/NodeDiagnosticsDispatcher.cs Outdated
Comment thread plugins/NodeDiagnostics/NodeDiagnosticsDispatcher.cs Outdated
Comment thread plugins/NodeDiagnostics/NodeDiagnosticsDispatcher.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants