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 rake command for adding rails initializer #2218

Closed
sl0thentr0py opened this issue Jan 5, 2024 · 6 comments
Closed

Add rake command for adding rails initializer #2218

sl0thentr0py opened this issue Jan 5, 2024 · 6 comments

Comments

@sl0thentr0py
Copy link
Member

we want to make it easier for rails users to setup sentry, see
https://fly.io/docs/reference/sentry/#ruby-on-rails
and
https://github.com/getsentry/sentry-wizard

  • add new rake command like bundle exec sentry:setup
  • auto create default initializer
  • some questions TBD (see sentry-wizard and how they do it)
    • DSN
    • enable performance
    • enable profiling
@st0012
Copy link
Collaborator

st0012 commented Feb 25, 2024

If this only targets Rails apps, maybe we can use Rails' generator instead?

It also supports cli options. So once this is completed, we can just generate a one line command on the web UI like:

bundle exec bin/rails generate sentry --dsn <user DSN> --enable-profiling true

@sl0thentr0py
Copy link
Member Author

yep also a possibility!

@smeubank
Copy link
Member

smeubank commented Apr 11, 2024

some questions TBD (see sentry-wizard and how they do it)

  • DSN
  • enable performance
  • enable profiling

We do not enable profiling OOTB with wizards, and there are not prompts as far as I know, to ask the user if they want the wizard to add it.

Ruby doesn't have to worry about uploading source context, it automatically sends sessions and attempts to set unique release values. Those would be the typical prompts we'd try to solve for, we should validate the release detection works as we expect.

For the DSN there is a login flow, which there are some cases we manage via the wizard well, and some we do not manage well. see -> getsentry/sentry-wizard#357 but this is more related to the org auth token

Setup Wizards: dev spec

fwiw I don't think detailed feature selection is first prio, but they are considering it for the other wizards as well: getsentry/sentry-wizard#558

Also, after chatting with Neel, I understand the steps for rails set up could become install and configure with this initializer command, which could trigger a CLI wizard like flow

is there a way that the install step could be combined? Like what we do with the other wizards?

npx @sentry/wizard@latest -i nextjs

@st0012
Copy link
Collaborator

st0012 commented Apr 14, 2024

Personally, I wouldn't want to install a npm package just to have it help me set up a SDK, unless it provides significantly better experience. In the Rails community, installing a gem and run its associated Rails generator command for configuration is a pretty standard practice. For example, bugsnag and airbrake have Rails generators too. But I don't think Rails generators can provide the same interactive experience like the wizard does.

FWIW, appsignal provides a library-agnostic executable to provide a rich installation or even diagnose experience. This may be closer to what we want to achieve with wizard? That said, IMO this is not something the Ruby SDK team should prioritize the resource for.

For the DSN there is a login flow

Is there any doc or example to show this is achieved?

@smeubank
Copy link
Member

smeubank commented Apr 14, 2024

Personally, I wouldn't want to install a npm package just to have it help me set up a SDK

fair, we also made it available via brew for mobile platforms, for similar reasons. I don't know if something similar is possible for ruby gem's, to make it available in way that would make sense for ruby devs, and even ideally delete it after the wizard is complete.

FWIW, appsignal provides a library-agnostic executable to provide a rich installation or even diagnose experience. This may be closer to what we want to achieve with wizard? That said, IMO this is not something the Ruby SDK team should prioritize the resource for.

without any insight into how much effort it would be, I don't think it is a high prio either, we can create a different ticket to track it for possible future work

For the DSN there is a login flow

Is there any doc or example to show this is achieved?

@Lms24 do you have more insights to share about the project selection to fetch the correct DSN?

@sl0thentr0py
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants