Skip to content

Improve release macro/auto release detection #1224

Description

@lcian

Problem Statement

The release_name macro defaults to the cargo package name + version. This is not useful in a server application, where the version might be always 0.1.0. There, the user needs to specify the release manually. It would make sense if the SDK does this instead.

Solution Brainstorm

It would probably be better to use the Git commit hash, as done for instance by the Python SDK: https://github.com/getsentry/sentry-python/blob/7d4ac90be7a485cab70e37ccc831ca86b8f9c30d/sentry_sdk/utils.py#L148.
Arguably this could be done automatically under the hood, instead of having the user need to use the release_name macro. Right now we only read SENTRY_RELEASE under the hood and do the detection in the macro.

Metadata

Metadata

Assignees

No one assigned

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions