Skip to content

Monitoring

Use monitoring to catch failures that break a business flow, not to log everything. In the snippets, ext is your createExtHelper() instance.

Report business-critical failures

Report the cases where your extension can no longer do its job — for example, settings that failed to parse, or a game mechanic that broke. Use v1.monitoring.report.error with a clear message and just enough context to debug.

ts
try {
  const { settings } = await ext.makeRequest('v1.ext.settings.get', null);
  yourApplySettings(settings);
} catch (err) {
  ext.makeRequest('v1.monitoring.report.error', {
    message: 'failed to load settings',
    data: { err: String(err) },
  });
}

Keep it focused

  • Report broken business flows (a mechanic failed, a required action returned an error, state could not be restored).
  • Do not report routine events, expected branches, or high-frequency noise — that buries the signal.
  • Include only the context needed to reproduce the issue; never log payment or personal data.