How to use Metrics (if possible)? #193
Answered
by
stayallive
alessandro-newzoo
asked this question in
Q&A
-
Hello, and thanks as always for your amazing work with this package! Is it possible to send custom JS Metrics to Sentry? https://docs.sentry.io/platforms/javascript/metrics/ I couldn't find anything in your docs, discussions and issues. Thank you! |
Beta Was this translation helpful? Give feedback.
Answered by
stayallive
Jun 13, 2024
Replies: 1 comment 3 replies
-
The JS SDK is loaded so you can just call something like this from the docs:
Keep in mind that this is JavaScript code and you cannot emit JavaScript metrics from PHP code. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ah I see the issue... I read over it. Apparently v7 of the SDK need an extra integration for metrics to function. We should probably add this by default or have an easier way to enable this. But for now you can paste this snippet in your theme functions.php for example.
After this metrics should start working!