Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ref(metrics): remove features and code related to the old metrics beta #740

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lcian
Copy link
Member

@lcian lcian commented Feb 5, 2025

Removes features and code related to the old metrics beta.
Since metrics have been deprecated from the product a few months ago, we can remove the features and code directly instead of deprecating them first.

I have checked and Relay (which uses the sentry-types crate) compiles fine with these changes.

Closes #736

Update: we will just deprecate for now and then wait for sentry-cli to release a major so we can remove all the APIs

@lcian lcian marked this pull request as ready for review February 5, 2025 16:23
@lcian lcian marked this pull request as draft February 6, 2025 08:36
@Swatinem
Copy link
Member

Swatinem commented Feb 6, 2025

we can remove the features and code directly instead of deprecating them first.

keep in mind we still need a semver-major (aka minor version as we are [perpetually] 0.X)

Relay (which uses the sentry-types crate)

I’m surprised it does. Do you know what for exactly?

Probably the more interesting thing to test would be sentry-cli, which uses the SDK to submit demo/test events.

@lcian
Copy link
Member Author

lcian commented Feb 6, 2025

we can remove the features and code directly instead of deprecating them first.

keep in mind we still need a semver-major (aka minor version as we are [perpetually] 0.X)

Sure. I then changed my mind and I was thinking to deprecate the feature first and that's why I turned this PR into a draft.

Relay (which uses the sentry-types crate)

I’m surprised it does. Do you know what for exactly?

It's only used here: https://github.com/getsentry/relay/blob/3dfdba91c534877f4623a76e6dcd187a4caf2c00/relay-common/src/lib.rs#L14

Probably the more interesting thing to test would be sentry-cli, which uses the SDK to submit demo/test events.

Good catch.
Indeed, the CLI still has some metrics APIs with a deprecation warning, saying that they will be removed in the next major.

With this information, I would just add deprecation warnings to the SDK, then wait for the next sentry-cli major to completely remove the code and crate feature from the SDK.
This way they will still be able to use the latest version of the SDK.

@lcian lcian changed the title ref(metrics): remove features and code related to the old metrics beta ref(metrics): deprecate metrics Feb 6, 2025
@lcian lcian changed the title ref(metrics): deprecate metrics ref(metrics): deprecate metrics beta features Feb 6, 2025
@lcian lcian changed the title ref(metrics): deprecate metrics beta features ref(metrics): remove features and code related to the old metrics beta Feb 6, 2025
@Swatinem
Copy link
Member

Swatinem commented Feb 6, 2025

With this information, I would just add deprecation warnings to the SDK, then wait for the next sentry-cli major to completely remove the code and crate feature from the SDK.

TBH, I consider these usages within sentry-cli as really bad. The SDK is not made for that usecase, and sentry-cli should probably use some raw envelope items or some other way, instead of using the SDK "as an SDK" to do this.

@lcian lcian marked this pull request as ready for review February 10, 2025 12:30
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.

Deprecate Metrics APIs
2 participants