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

How to send release? #873

Closed
GaboFDC opened this issue Oct 24, 2018 · 14 comments
Closed

How to send release? #873

GaboFDC opened this issue Oct 24, 2018 · 14 comments
Labels
Projects

Comments

@GaboFDC
Copy link

GaboFDC commented Oct 24, 2018

Other implementations have the option to set the release.

sentry_sdk.init(release="[email protected]")
Sentry.init({
  release: "[email protected]"
})

I haven't found in the documentation anywhere who to do it in ruby/rails

@blairanderson
Copy link

I would also like to know this, i've not been able to find in the code either.

@blairanderson
Copy link

blairanderson commented Jan 3, 2019

it looks likes EVENTS that are sent will pull the current release from the configuration https://github.com/getsentry/raven-ruby/blob/master/lib/raven/event.rb#L198

  self.release     ||= configuration.release

but i am not sure if this is the same as sending an init event with release data

@dentarg
Copy link
Contributor

dentarg commented Jan 3, 2019

Just dropping a permalink for the above URL https://github.com/getsentry/raven-ruby/blob/v2.7.4/lib/raven/event.rb#L198 as the "master link" will probably point to some other line of code in the future :)

@jeremy
Copy link

jeremy commented Jan 3, 2019

You can use sentry-cli to manage releases: https://docs.sentry.io/cli/releases/

Note that the config doesn't create a release using Sentry API. It sets the release to use for Sentry events. That's autodetected, but you can manually override with

Raven.configure do |config|
  config.release = '2.3.12'
end

@blairanderson
Copy link

blairanderson commented Jan 4, 2019 via email

@jeremy
Copy link

jeremy commented Jan 4, 2019

Yep. Using a source control integration is recommended: https://docs.sentry.io/workflow/releases/

You may use curl to directly invoke the API as well.

@danroestorf
Copy link

danroestorf commented Apr 2, 2019

When using the Raven config in this manner:

Raven.configure do |config|
  config.release = ENV['RELEASE']
end

What is the best value to use as RELEASE? I see in the documentation for Ruby specifically it mentions a commit SHA, but other docs it shows a [email protected] syntax.

I'd prefer to use my git tag for the release. Do I gain anything by passing in a commit SHA? Does it automatically grab the git tag even when prepended with an app name as recommended? So many missing details.

@dentarg
Copy link
Contributor

dentarg commented May 9, 2019

Is this correct? detect_release is only doing the "Tell Sentry When You Deploy a Release" step from https://docs.sentry.io/workflow/releases/, I still need to use the Sentry API somewhere in my deploy process to do the "Associate Commits with a Release" step

@agis
Copy link

agis commented May 9, 2019

AFAICT this is a separate step and is done by using the web API and not from raven-ruby.

@alexanderadam
Copy link

alexanderadam commented Jul 19, 2019

The process of registering a release seems to be simple though and can be done with curl, wget or Ruby.

@st0012
Copy link
Collaborator

st0012 commented Aug 14, 2020

As @jeremy said, you should be able to set the release with

Raven.configure do |config|
  config.release = "revision"
end

If it's not set, the SDK will detect release from different sources in the following order:

  1. ENV["SENTRY_CURRENT_ENV"]
  2. git
  3. capistrano revision file or revisions.log
  4. ENV["HEROKU_SLUG_COMMIT"] if your app is on heroku

I'm going to close this now, but feel free to reopen it if you still have questions on release detection 😄

@st0012 st0012 closed this as completed Aug 14, 2020
@st0012 st0012 added this to Needs triage in 3.x via automation Aug 14, 2020
@st0012 st0012 moved this from Needs triage to Closed in 3.x Aug 14, 2020
@alexanderadam
Copy link

alexanderadam commented Aug 14, 2020

@st0012 there's still no support for creating release information, right?

Is there any other issue about creating a release?

@st0012
Copy link
Collaborator

st0012 commented Aug 14, 2020

currently, we have no plan to support creating release information from SDK (not just Ruby SDK, but all SDKs). so please use either the API or cli for that purpose as the document suggests. I'll keep you posted if this decision was changed 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
3.x
  
Closed
Development

No branches or pull requests

8 participants