Class CheckInUtils

java.lang.Object
io.sentry.util.CheckInUtils

@Experimental public final class CheckInUtils extends Object
  • Constructor Details

    • CheckInUtils

      public CheckInUtils()
  • Method Details

    • 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 a Callable
      Type Parameters:
      U - - the result type of the Callable
      Parameters:
      monitorSlug - - the slug of the monitor
      monitorConfig - - configuration of the monitor, can be used for upserting schedule
      callable - - the Callable to be called
      Returns:
      the return value of the Callable
      Throws:
      Exception
    • 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 a Callable
      Type Parameters:
      U - - the result type of the Callable
      Parameters:
      monitorSlug - - the slug of the monitor
      callable - - the Callable to be called
      Returns:
      the return value of the Callable
      Throws:
      Exception
    • isIgnored

      @Internal public static boolean isIgnored(@Nullable @Nullable List<String> ignoredSlugs, @NotNull @NotNull String slug)
      Checks if a check-in for a monitor (CRON) has been ignored.