getsentry / getsentry/sentry-rust

Improve release macro/auto release detection

Open
#1,224 1 comment 0 reactions 0 assignees View on GitHub
Improvement Rust
Dominant language
Rust
Stars
752
Forks
190
Avg merge
1h 21m
Merged PRs (30d)
5

Description

### 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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the `release_name` macro and the code that currently reads `SENTRY_RELEASE`; compare the proposed Git commit detection with the linked Python SDK implementation. Determine how automatic detection should interact with the macro and environment variable, then verify that server applications receive a useful release without manual configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
release
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.