sentry-react-native
sentry-react-native copied to clipboard
Missing support for Associated commits
OS:
- [ ] Windows
- [ ] MacOS
- [ ] Linux
Platform:
- [ ] iOS
- [x] Android
SDK:
- [x]
@sentry/react-native
(>= 1.0.0) - [ ]
react-native-sentry
(<= 0.43.2)
SDK version: 1.4.5
react-native
version: 0.62.2
Are you using Expo?
- [ ] Yes
- [x] No
Are you using sentry.io or on-premise?
- [x] sentry.io (SaaS)
- [ ] on-premise
If you are using sentry.io, please post a link to your issue so we can take a look:
N/A
Configuration:
(@sentry/react-native
)
Sentry.init({
dsn: sentryDsn,
release: `${BuildInfo.bundleIdentifier}@${BuildInfo.appVersion}+${BuildInfo.buildVersion}`,
dist: BuildInfo.buildVersion,
enableAutoSessionTracking: true
});
I have following issue:
On the Sentry platform and in the doc is described a way to associate commits with a release.
As far as I can tell, this is not supported by sentry-react-native
. I don't see any reference to sentry-cli releases set-commits
in https://github.com/getsentry/sentry-react-native/blob/master/sentry.gradle for example.
Is there any plan to support this please?
Steps to reproduce: Build the Android react-native app with the release setup.
Actual result:
Associated commits are not setup
Expected result:
Associated commits are setup
@fabiendem have you tried using the CLI? https://docs.sentry.io/workflow/releases/?platform=javascript#using-the-cli
I've tagged it as a feature request, to support https://docs.sentry.io/workflow/releases/?platform=javascript#associate-commits-with-a-release and https://docs.sentry.io/product/releases/suspect-commits/
@fabiendem have you tried using the CLI? https://docs.sentry.io/workflow/releases/?platform=javascript#using-the-cli
I haven't because it's not really part of the workflow if you use the gradle plugin for Android
@fabiendem yep, but please do, actually, the plugin does use sentry-cli
as well., there's a built-in version.
You definitely can achieve what you want using this CLI till we get this done.
This issue has gone three weeks without activity. In another week, I will close it.
But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog
or Status: In Progress
, I will leave it alone ... forever!
"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀
Ticket is still relevant, could you add it to the backlog please?
We don't want to use the sentry-cli manually but instead leverage on the existing react-native integration. Doing things manually would get quite brittle in our case. Cheers
I've looked a bit more into this.
Looks like it's not trivial because the sentry gradle plugin at https://github.com/getsentry/sentry-react-native/blob/master/sentry.gradle relies on the sentry-cli
's command react_native_gradle
at https://github.com/getsentry/sentry-cli/blob/master/src/commands/react_native_gradle.rs.
This react_native_gradle
doesn't consume any commit
param, so my understanding is that we would need to first tweak
https://github.com/getsentry/sentry-cli/blob/b33dabaca411a9d880f0c41809b4ec1f8b049541/src/commands/react_native_gradle.rs#L99-L106 so it can consume the set-commits
from https://github.com/getsentry/sentry-cli/blob/b33dabaca411a9d880f0c41809b4ec1f8b049541/src/commands/releases.rs#L87-L139
Then we could update the sentry gradle plugin for react-native with this new param.
🤔 I don't know how, but we started to see Associated/suspect commits attached to our errors for a react-native project in the Sentry dashboard. 🤷♂️ Have you folks made some change somewhere?
A team was looking at it, most likely, but I'd expect that you have to use sentry-cli manually in this case? unless you have a Git integration setup in Sentry.
We have the Git integration setup indeed, but it's been the case for a while. We don't use the Sentry cli directly, but use the default Gradle integration instead (just followed the classic doc).
Not sure what changed. Anyway that's a good news. 😄 I was wondering if I missed some release notes somewhere, no big deal.
I can't tell if you should close this ticker or not.. since now we see suspect commits, it seems to be supported on react-native
, somehow.
Good news. 😁 But we haven't changed anything in the RN SDK regarding the suspect commit.
You still should need to manually add the cli command.
@fabiendem Could you give us an example of what your app release looks like and what it consists of?
Sorry what do you mean by "app release" exactly?
@fabiendem No worries. The name of the release, for example on iOS, it could be ${bundleIdentifier}@${version}+${buildNumber}
.
So, there was an update on this feature on Sentry.io and now only correct source maps and Git integrations are enough to enable associated commits.
Cheers.
The name of the release, for example on iOS, it could be ${bundleIdentifier}@${version}+${buildNumber}.
We use this, whatever is standard in the Sentry SDK.
Looks this blog post announced the change which is making this ticket irrelevant https://blog.sentry.io/2022/12/06/suspect-commits-via-git-blame/