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 Sentry Nuxt module #5279

Merged
merged 6 commits into from
Dec 17, 2024
Merged

Add Sentry Nuxt module #5279

merged 6 commits into from
Dec 17, 2024

Conversation

obulat
Copy link
Contributor

@obulat obulat commented Dec 15, 2024

Fixes

Fixes #5270 by @obulat

Description

This PR replaces our bespoke implementation of the Sentry integration with the official Sentry Nuxt module.

Testing Instructions

Run ov env NUXT_PUBLIC_SENTRY_DSN=somevalue, add debug=true to the Sentry config files (server and client) and verify that Sentry is being initialized.

Checklist

  • My pull request has a descriptive title (not a vague title likeUpdate index.md).
  • My pull request targets the default branch of the repository (main) or a parent feature branch.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added or updated tests for the changes I made (if applicable).
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.
  • I ran the DAG documentation generator (ov just catalog/generate-docs for catalog
    PRs) or the media properties generator (ov just catalog/generate-docs media-props
    for the catalog or ov just api/generate-docs for the API) where applicable.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@openverse-bot openverse-bot added 🧱 stack: documentation Related to Sphinx documentation 🧱 stack: frontend Related to the Nuxt frontend 🟨 priority: medium Not blocking but should be addressed soon 🧰 goal: internal improvement Improvement that benefits maintainers, not users 💻 aspect: code Concerns the software code in the repository labels Dec 15, 2024
@obulat obulat force-pushed the add/sentry-nuxt-module branch 3 times, most recently from 44cc88f to 3ef8856 Compare December 16, 2024 07:46
Copy link

github-actions bot commented Dec 16, 2024

Latest k6 run output1

     ✓ status was 200

     checks.........................: 100.00% ✓ 390      ✗ 0   
     data_received..................: 88 MB   366 kB/s
     data_sent......................: 51 kB   213 B/s
     http_req_blocked...............: avg=92.6µs   min=2.24µs   med=4.76µs   max=7.48ms   p(90)=146.34µs p(95)=181.89µs
     http_req_connecting............: avg=75.98µs  min=0s       med=0s       max=7.43ms   p(90)=99.51µs  p(95)=124.8µs 
     http_req_duration..............: avg=171.64ms min=28.52ms  med=134.69ms max=809.97ms p(90)=325.21ms p(95)=403.44ms
       { expected_response:true }...: avg=171.64ms min=28.52ms  med=134.69ms max=809.97ms p(90)=325.21ms p(95)=403.44ms
   ✓ http_req_failed................: 0.00%   ✓ 0        ✗ 390 
     http_req_receiving.............: avg=158µs    min=56.58µs  med=129.56µs max=572.68µs p(90)=286.21µs p(95)=352.84µs
     http_req_sending...............: avg=24.37µs  min=9.14µs   med=21.88µs  max=134.19µs p(90)=34.86µs  p(95)=41.91µs 
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=171.46ms min=28.43ms  med=134.5ms  max=809.38ms p(90)=325.03ms p(95)=403.18ms
     http_reqs......................: 390     1.622844/s
     iteration_duration.............: avg=912.06ms min=255.98ms med=1.08s    max=1.85s    p(90)=1.25s    p(95)=1.36s   
     iterations.....................: 74      0.307924/s
     vus............................: 0       min=0      max=6 
     vus_max........................: 60      min=60     max=60

Footnotes

  1. This comment will automatically update with new output each time k6 runs for this PR

@obulat obulat force-pushed the add/sentry-nuxt-module branch 4 times, most recently from 4401e95 to 536f23a Compare December 16, 2024 18:34
Copy link

Full-stack documentation: https://docs.openverse.org/_preview/5279

Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again.

You can check the GitHub pages deployment action list to see the current status of the deployments.

@obulat obulat force-pushed the add/sentry-nuxt-module branch from 536f23a to 56bbb8f Compare December 16, 2024 19:18
@obulat obulat force-pushed the add/sentry-nuxt-module branch from 56bbb8f to be2f45f Compare December 16, 2024 19:25
@obulat obulat marked this pull request as ready for review December 16, 2024 19:42
@obulat obulat requested review from a team as code owners December 16, 2024 19:42
@obulat obulat requested review from krysal and dhruvkb and removed request for a team December 16, 2024 19:42
Copy link
Member

@dhruvkb dhruvkb left a comment

Choose a reason for hiding this comment

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

I have a couple of questions, for my own understanding. Code-wise, this PR looks good to me, and it's nice that we can make better use of Sentry with the plugin. #4907 is another good candidate for improving Sentry functionality.

"@tailwindcss/typography": "^0.5.13",
"@vueuse/core": "^12.0.0",
"@wordpress/is-shallow-equal": "^5.3.0",
"async-mutex": "^0.5.0",
"axios": "^1.7.2",
"axios-mock-adapter": "^1.22.0",
"clipboard": "^2.0.11",
"dotenv": "^16.4.7",
Copy link
Member

Choose a reason for hiding this comment

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

This surprised me because I had read that Nuxt has dotenv built-in.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, we already had it in the lock file due to Nuxt. I added it because it was mentioned in the Nuxt Sentry module setup docs, but removed it after your comment.

Comment on lines +47 to +48
# Sentry Config File
.env.sentry-build-plugin
Copy link
Member

Choose a reason for hiding this comment

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

What is the reason for this being named .env.sentry-build-plugin? Could it be similar to the env setup for other other packages so that we can reuse the existing workflow (.env file created from env.template using the env recipe etc.)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was added by the Sentry module wizard. I added the env variable to the GitHub repository, so it's not really necessary anymore.

@obulat obulat merged commit 4555dcd into main Dec 17, 2024
53 checks passed
@obulat obulat deleted the add/sentry-nuxt-module branch December 17, 2024 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository 🧰 goal: internal improvement Improvement that benefits maintainers, not users 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: documentation Related to Sphinx documentation 🧱 stack: frontend Related to the Nuxt frontend
Projects
Status: 🤝 Merged
Development

Successfully merging this pull request may close these issues.

Use the Sentry Nuxt module instead of our temporary implementation
3 participants