Skip to content

Conversation

@ahmedetefy
Copy link
Contributor

@ahmedetefy ahmedetefy commented Apr 15, 2021

This PR:

  • Generates a Sentry Release string from env variables dynamically if its not provided on init

@ahmedetefy ahmedetefy requested a review from kamilogorek as a code owner April 15, 2021 09:12
@ahmedetefy ahmedetefy marked this pull request as draft April 15, 2021 09:13
@ahmedetefy ahmedetefy removed the request for review from kamilogorek April 15, 2021 09:13
@ahmedetefy ahmedetefy force-pushed the add-release-default branch 2 times, most recently from a33d60d to 4b0cafc Compare April 15, 2021 09:15
@ahmedetefy ahmedetefy force-pushed the add-release-default branch from 8500da4 to 204eae7 Compare April 15, 2021 09:24
@github-actions
Copy link
Contributor

github-actions bot commented Apr 15, 2021

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 20.59 KB (-0.01% 🔽)
@sentry/browser - Webpack 21.45 KB (0%)
@sentry/react - Webpack 21.49 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 27.8 KB (0%)

@ahmedetefy ahmedetefy marked this pull request as ready for review April 15, 2021 09:25
@ahmedetefy ahmedetefy requested review from a team, iker-barriocanal, kamilogorek and lobsterkatie and removed request for a team, iker-barriocanal and lobsterkatie April 15, 2021 09:25
@ahmedetefy ahmedetefy requested a review from kamilogorek April 15, 2021 10:51
@kamilogorek
Copy link
Contributor

tbh I'd prefer to have it undefined and setup options.release only conditionally. Otherwise we'll have unnecessary key in options.

@ahmedetefy
Copy link
Contributor Author

ahmedetefy commented Apr 15, 2021

tbh I'd prefer to have it undefined and setup options.release only conditionally. Otherwise we'll have unnecessary key in options.

Oh so you mean only if autoSessionTracking is enabled?

@kamilogorek
Copy link
Contributor

kamilogorek commented Apr 15, 2021

More like:

if (options.release === undefined) {
  const detectedRelease = getSentryRelease();
  if (detectedRelease !== undefined) {
    options.release = detectedRelease;
  }
}

Otherwise we'll always end up with event.release: "" sent to server

@ahmedetefy
Copy link
Contributor Author

More like:

if (options.release === undefined) {
  const detectedRelease = getSentryRelease();
  if (detectedRelease !== undefined) {
    options.release = detectedRelease;
  }
}

Otherwise we'll always end up with event.release: "" sent to server

Done!

@ahmedetefy ahmedetefy merged commit d98f5d6 into master Apr 15, 2021
@ahmedetefy ahmedetefy deleted the add-release-default branch April 15, 2021 12:31
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