Replies: 1 comment 6 replies
-
@rowanmoul you should be able to use the Sentry CLI to do this: You can also do this automatically when building your solution via build properties: It's worth reading this comment to understand how the Sentry infers the "release" both at build time (to upload debug and source files) and at run time (when sending events to Sentry): |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm not sure if this is possible, but I was hoping that I could configure the Sentry SDK to include the commit hash of the currently running code/assembly in reported errors, which could then be used to automatically match that error with a Sentry Release created later and linked to that commit (for example, by using this action: https://github.com/getsentry/action-release).
As far as I can tell this is not possible and I can only specify the name of the Sentry Release. Yes the name of the Sentry Release could be a commit hash, but those aren't very human readable.
Context:
We build our application when a git tag is created, and it is built into a container image. Initially the tags are "release candidate" tags (eg, rc_1.0.0). Once candidates have been tested, we re-tag the same commit and container image with a "release" tag (eg r_1.0.0). This ensures the released code is identical to the tested code (as opposed to re-building from source).
I would like to be able to bake the commit hash into the container image during the initial release candidate build and then have sentry still be able to associate errors from that container with the appropriate release, which is not known at build time.
As a work around, I can specify the Sentry Release name via environment variable in my kuberentes manifests, but this is not as clean as it decouples the specified release name from the commit that the container image was built from, and relies me to make sure they actually match.
Beta Was this translation helpful? Give feedback.
All reactions