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 and configure Sentry gem #146

Merged
merged 2 commits into from
Nov 25, 2024
Merged

Add and configure Sentry gem #146

merged 2 commits into from
Nov 25, 2024

Conversation

matt-bernhardt
Copy link
Member

@matt-bernhardt matt-bernhardt commented Nov 22, 2024

This adds the Sentry integration, similarly to what we've done with other applications and the current Sentry documentation.

Developer

Ticket(s)

https://mitlibraries.atlassian.net/browse/TCO-88

Accessibility

  • ANDI or Wave has been run in accordance to our guide and
    all issues introduced by these changes have been resolved or opened
    as new issues (link to those issues in the Pull Request details above)
  • There are no accessibility implications to this change

Documentation

  • Project documentation has been updated, and yard output previewed
  • No documentation changes are needed

ENV

  • All new ENV is documented in README.
  • All new ENV has been added to Heroku Pipeline, Staging and Prod.
  • ENV has not changed.

Stakeholders

  • Stakeholder approval has been confirmed
  • Stakeholder approval is not needed

Dependencies and migrations

YES dependencies are updated

NO migrations are included

Reviewer

Code

  • I have confirmed that the code works as intended.
  • Any CodeClimate issues have been fixed or confirmed as
    added technical debt.

Documentation

  • The commit message is clear and follows our guidelines
    (not just this pull request message).
  • The documentation has been updated or is unnecessary.
  • New dependencies are appropriate or there were no changes.

Testing

  • There are appropriate tests covering any new functionality.
  • No additional test coverage is required.

@mitlib mitlib temporarily deployed to tacos-api-pipeline-pr-146 November 22, 2024 22:04 Inactive
Copy link
Member

@JPrevost JPrevost left a comment

Choose a reason for hiding this comment

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

I know you didn't request a review yet, but you had mentioned in slack this was running so I did a review before I realized it was still a draft. Sorry if it wasn't ready!

return unless ENV.has_key?('SENTRY_DSN')
config.dsn = ENV.fetch('SENTRY_DSN')
config.breadcrumbs_logger = [:active_support_logger, :http_logger]
config.enable_tracing = true
Copy link
Member

Choose a reason for hiding this comment

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

Let's not enable tracing via Sentry at this time. We should get the same/similar data via Scout. If we want to move that to Sentry instead we can discuss, but don't need to have both on for now.

Gemfile Outdated
@@ -69,6 +69,11 @@ gem 'rack-cors'
# Use Redis adapter to run Action Cable in production
# gem "redis", ">= 4.0.1"

# Sentry integration according to their documentation [https://docs.sentry.io/platforms/ruby/guides/rails/]
gem "stackprof"
Copy link
Member

Choose a reason for hiding this comment

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

stackprof is only required if we enable profiling and/or tracing. I think for now we should leave both off and remove this gem.

@mitlib mitlib temporarily deployed to tacos-api-pipeline-pr-146 November 25, 2024 17:01 Inactive
@matt-bernhardt
Copy link
Member Author

No worries - the big reason this wasn't in review yet was because I was wanting to troubleshoot why the messages weren't showing up in Slack yet. That doesn't seem like something that would affect these code changes, though.

@matt-bernhardt matt-bernhardt marked this pull request as ready for review November 25, 2024 17:02
@matt-bernhardt matt-bernhardt merged commit 8b1e2d4 into main Nov 25, 2024
6 checks passed
@matt-bernhardt matt-bernhardt deleted the tco-88 branch November 25, 2024 19:15
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

Successfully merging this pull request may close these issues.

3 participants