Package io.sentry.util
Class CheckInUtils
java.lang.Object
io.sentry.util.CheckInUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isIgnored
(@Nullable List<FilterString> ignoredSlugs, @NotNull String slug) Checks if a check-in for a monitor (CRON) has been ignored.static <U> U
withCheckIn
(@NotNull String monitorSlug, @NotNull Callable<U> callable) Helper method to send monitor check-ins for aCallable
static <U> U
withCheckIn
(@NotNull String monitorSlug, @Nullable MonitorConfig monitorConfig, @NotNull Callable<U> callable) Helper method to send monitor check-ins for aCallable
static <U> U
withCheckIn
(@NotNull String monitorSlug, @Nullable String environment, @NotNull Callable<U> callable) Helper method to send monitor check-ins for aCallable
static <U> U
withCheckIn
(@NotNull String monitorSlug, @Nullable String environment, @Nullable MonitorConfig monitorConfig, @NotNull Callable<U> callable) Helper method to send monitor check-ins for aCallable
-
Constructor Details
-
CheckInUtils
public CheckInUtils()
-
-
Method Details
-
withCheckIn
public static <U> U withCheckIn(@NotNull @NotNull String monitorSlug, @Nullable @Nullable String environment, @Nullable @Nullable MonitorConfig monitorConfig, @NotNull @NotNull Callable<U> callable) throws Exception Helper method to send monitor check-ins for aCallable
- Type Parameters:
U
- - the result type of theCallable
- Parameters:
monitorSlug
- - the slug of the monitormonitorConfig
- - configuration of the monitor, can be used for upserting scheduleenvironment
- - the name of the environmentcallable
- - theCallable
to be called- Returns:
- the return value of the
Callable
- Throws:
Exception
-
withCheckIn
public static <U> U withCheckIn(@NotNull @NotNull String monitorSlug, @Nullable @Nullable MonitorConfig monitorConfig, @NotNull @NotNull Callable<U> callable) throws Exception Helper method to send monitor check-ins for aCallable
-
withCheckIn
public static <U> U withCheckIn(@NotNull @NotNull String monitorSlug, @Nullable @Nullable String environment, @NotNull @NotNull Callable<U> callable) throws Exception Helper method to send monitor check-ins for aCallable
-
withCheckIn
public static <U> U withCheckIn(@NotNull @NotNull String monitorSlug, @NotNull @NotNull Callable<U> callable) throws Exception Helper method to send monitor check-ins for aCallable
-
isIgnored
@Internal public static boolean isIgnored(@Nullable @Nullable List<FilterString> ignoredSlugs, @NotNull @NotNull String slug) Checks if a check-in for a monitor (CRON) has been ignored.
-