getsentry / sentry-java

A Sentry SDK for Java, Android and other JVM languages.
https://docs.sentry.io/
MIT License
1.16k stars 435 forks source link

Extend CheckInUtils with check-in for a specific environment #3889

Closed maxhov closed 3 days ago

maxhov commented 1 week ago

:scroll: Description

Extend CheckInUtils with an option to check in to a specific environment, which is currently not possible with CheckInUtils.

:bulb: Motivation and Context

Currently it is not possible to check in to a specific environment with CheckInUtils. When monitoring a scheduled job that runs for multiple environments, it is helpful to be able to check in specific environments. To accomplish this in the current version requires copy, pasting and modifying the existing code to a custom class and adding it yourself.

:green_heart: How did you test it?

Added a unit test

:pencil: Checklist

:crystal_ball: Next steps

adinauer commented 4 days ago

Thanks for the PR, I'll retarget it to the v8 release.

adinauer commented 4 days ago

Oh boy, gimme a minute to resolve these conflicts.

maxhov commented 3 days ago

LGTM, @maxhov can you please take another look to make sure I didn't mess anything up while resolving conflicts?

LGTM :)

adinauer commented 7 hours ago

The changes in this PR were just released as part of 8.0.0-beta.3.