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

Add support for new Crash Analytics feature #437

Open
tsteur opened this issue Aug 30, 2023 · 0 comments
Open

Add support for new Crash Analytics feature #437

tsteur opened this issue Aug 30, 2023 · 0 comments

Comments

@tsteur
Copy link
Member

tsteur commented Aug 30, 2023

To support Matomo's new Crash Analytics feature, we'd like to add crash tracking methods in all supported tracking SDKs.

The tracking methods should be similar to the PHP SDK's methods:

public function trackPhpThrowable(\Throwable $ex, $category = false); // deduces as much information as possible

public function trackCrash($message, $type, $category, $stack, $location, $line, $column); // user supplies all information

trackCrash() passes its parameters as the following HTTP API parameters:

  • $message: sent as cra, the crash message
  • $type: sent as cra_tp, the type of crash, for example "TypeError"
  • $category: sent as cra_ct (optional, it's like a custom dimension to categorise the crash, typically left empty)
  • $stack: sent as cra_st, a stack trace or similar
  • $location: (the originating source file) sent as cra_ru, the file name or source or something similar
  • $line: sent as cra_rl, the line number in the file
  • $column: sent as cra_rc, the column within the line of the file

IMPORTANT It must also pass ca=1 (stands for 'custom action') as a parameter so if the plugin is deactivated in Matomo, nothing will be tracked.

trackPhpThrowable (or the equivalent method for the language of this SDK) should accept an exception object and deduce set the crash tracking parameters based on it. The type should be set to the exception class name or something similar.

See also the implementation in the PHP tracker:

Please let me know if there are any questions.

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

No branches or pull requests

1 participant