最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugins - How to implement Sentry on Wordpress?

programmeradmin7浏览0评论
Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 4 years ago.

Improve this question

I need Sentry to track errors in my project code, the unofficial plugin for wordpress seems to be useless. How should I fix it?

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 4 years ago.

Improve this question

I need Sentry to track errors in my project code, the unofficial plugin for wordpress seems to be useless. How should I fix it?

Share Improve this question edited Sep 26, 2020 at 9:43 Asaf M asked Jul 27, 2020 at 19:41 Asaf MAsaf M 1427 bronze badges 1
  • 3rd party plugin support is offtopic, you should contact the plugin authors to fix/add JS support, or, consult Sentry docs on how to add it – Tom J Nowell Commented Jul 27, 2020 at 20:03
Add a comment  | 

1 Answer 1

Reset to default 3

For php I used this guide: https://cloudpresshosting.co.uk/blog/reporting-wordpress-errors-to-sentry

For JS, I found out I can take the code of the bundle and the initialization and put in the header, using "add scripts to header and footer" plugin. https://wordpress/plugins/header-and-footer-scripts It took me time to notice I can't put the initialization within the bundle import. Got something like this:

<script
  src="https://browser.sentry-cdn/5.20.1/bundle.min.js"
  integrity="sha384-O8HdAJg1h8RARFowXd2J/r5fIWuinSBtjhwQoPesfVILeXzGpJxvyY/77OaPPXUo"
  crossorigin="anonymous">
</script>
<script>
Sentry.init({ dsn: 'https://unique@unique' });
</script>
发布评论

评论列表(0)

  1. 暂无评论