Skip to content

Enhanced Diagnostics and Analytics - #211

Merged
Razzmatazzz merged 8 commits into
the-hideout:masterfrom
GiribaldiTTV:feature/enhanced-diagnostics-and-analytics
Aug 11, 2026
Merged

Enhanced Diagnostics and Analytics#211
Razzmatazzz merged 8 commits into
the-hideout:masterfrom
GiribaldiTTV:feature/enhanced-diagnostics-and-analytics

Conversation

@GiribaldiTTV

@GiribaldiTTV GiribaldiTTV commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Overview

This PR addresses two related failure paths in TarkovMonitor:

  • EFT/Steam log discovery failing or returning an unusable path.
  • Watcher diagnostics causing the application UI to become difficult or impossible to use.

When EFT logs are unavailable, TarkovMonitor now remains open and usable. The watcher fails closed, reports the problem once, and can recover when a valid logs folder becomes available.

This addresses #187 and #210.

Watcher and log-path handling

GameWatcher now has a controlled watcher configuration and recovery flow.

The changes:

  • Validate the EFT logs folder before enabling the watcher.
  • Disable the watcher and process timer when the configured path is missing.
  • Stop and clear stale log monitors when watcher configuration fails.
  • Rebind the watcher when the folder still exists but FileSystemWatcher reports an error.
  • Avoid running multiple watcher-recovery operations concurrently.
  • Support resetting a custom log path back to automatic discovery.
  • Cache failed automatic-path discovery so repeated property access does not continuously generate the same diagnostic.
  • Preserve normal application operation when the watcher cannot start.

This is especially important for Steam installations, where the EFT installation and logs location may not be available through the same discovery path as a traditional installation.

Log monitor and readiness fixes

The previous monitor startup flow could miss initial-read events or count unsupported files while determining readiness.

The new flow:

  • Recognizes only supported EFT log filenames.
  • Supports both standard and _000 log filenames.
  • Attaches monitor event handlers before starting the monitor.
  • Safely replaces existing monitors when a newer log file is detected.
  • Synchronizes monitor replacement and initial-read state.
  • Handles empty, partial, and late-created log files without treating them as application-fatal conditions.
  • Waits for the first readable application-log data before publishing application readiness.
  • Prevents Tarkov.dev or tracker initialization from running against an unknown profile.

Settings and sidebar responsiveness

The Settings page previously performed default log-folder discovery from the CustomLogsFolder getter. Because that getter is used during rendering, a discovery failure could add a diagnostic while the UI was rendering.

That behavior has been changed so that:

  • Log-folder discovery runs during component initialization or when the setting is reset.
  • The discovered path is cached for rendering.
  • The getter is now side-effect free.
  • Repeated diagnostic messages are filtered before calling StateHasChanged().

This prevents a repeated watcher error from causing a diagnostic/render loop that makes Settings or the sidebar appear frozen, which is the user-facing behavior associated with #187.

Diagnostics improvements

  • Diagnostic durations are optional instead of recording a misleading zero when timing was not measured.
  • Operations that produce diagnostics now capture elapsed time where appropriate.
  • Unmeasured durations are represented explicitly as [NOT_MEASURED].
  • Local drive paths, UNC paths, temporary paths, and common Windows environment paths are redacted.
  • Existing API-key, bearer-token, query-string, profile-ID, and sensitive-value redaction remains in place.
  • Diagnostic handling is wired through watcher, UI, API, tracker, socket, media, persistence, and startup error paths.

Commit disposition

  • 5fbe39d — Updates Tarkov.dev response-envelope handling so current API responses are processed correctly.
  • 5fed92a — Adds the privacy-safe diagnostics model, redaction, diagnostic snapshots, and user-facing diagnostic flow.
  • 5f9bf95 — Added development-only synthetic validation scaffolding. The final cleanup commit removes the test project and launcher from the repository so acceptance testing remains external and ignored.
  • 12f1a9d — Improves Steam log discovery and keeps navigation available when watcher setup fails.
  • a0c5e82 — Handles punctuated and future EFT session modes safely and fails closed for unsupported modes.
  • b125d3d — Adds watcher recovery, late-log handling, synchronized initial-read tracking, Settings render protection, and explicit fixes for Handle PvpSeason session mode without flooding or freezing the Dashboard #187 and Steam installs can leave GameWatcher without a usable EFT logs path #210.
  • c750f5b — Finalizes diagnostic timing and path redaction, removes committed development artifacts, and leaves the final PR scope focused on product changes.

Validation

  • Product build passed with 0 errors.
  • External injected-failure validation passed with failures=0.
  • Missing-path handling, same-instance recovery, cached discovery failure, late log creation, application readiness, and synthetic watcher errors were validated.
  • Steam discovery probe passed.

Fixes #187
Fixes #210

Model the current json.tarkov.dev data envelopes for tasks, maps, items, traders, and hideout responses. Preserve inner exceptions and guard missing or partial data so refresh and task-state failures remain actionable instead of becoming null-reference or index errors.
Route application, API, watcher, socket, filesystem, media, startup, and UI failures through stable short diagnostics with sanitized copy-first details. Add the Disclaimer Information child window and deterministic matching-start notification behavior for Issue the-hideout#194.
Add 17 deterministic tests for API envelopes, partial payloads, privacy, persistence, concurrency, copy safety, and Issue the-hideout#194. Document the diagnostic contract and provide a branch-local launcher for validation.
…e-hideout#210)

Keep missing, late, and recoverable EFT log watcher failures non-fatal. Rebind the watcher and monitors when the path or FileSystemWatcher fails, and publish application readiness only after the first readable application data.

Move Settings log discovery out of the render-time getter and ignore repeated diagnostic events before rerendering so Settings and sidebar navigation remain usable during watcher failures.

Fixes the-hideout#187

Fixes the-hideout#210
Make diagnostic durations optional and measure elapsed time at operation boundaries, harden local-path redaction, and keep diagnostic UI changes side-effect free.

Remove the committed acceptance harness, launcher, generated PR documentation, and retired disclaimer and assembly artifacts so focused sandbox validation remains external and ignored.

The preceding watcher commits carry the functional fixes for GitHub issues the-hideout#187 and the-hideout#210.
@GiribaldiTTV GiribaldiTTV changed the title Keep TarkovMonitor operational when EFT log discovery or watching fails Enhanced Diagnostics and Analytics Aug 10, 2026
Restore the queue-time debug handler to its upstream implementation so the published product diff contains only behavior used by the normal end-user runtime.

This does not change Release behavior or any watcher, diagnostics, API, or issue-fix functionality.

@Razzmatazzz Razzmatazzz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@Razzmatazzz
Razzmatazzz merged commit aceeea5 into the-hideout:master Aug 11, 2026
1 check passed
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

Successfully merging this pull request may close these issues.

Steam installs can leave GameWatcher without a usable EFT logs path Handle PvpSeason session mode without flooding or freezing the Dashboard

2 participants