Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions platform-includes/crons/setup/java.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,29 @@ CheckInUtils.withCheckIn("<monitor-slug>", monitorConfig) {
}
```

You can also check-in to a specific environment.

```java
import io.sentry.MonitorSchedule;
import io.sentry.MonitorScheduleUnit;
import io.sentry.util.CheckInUtils;

String result = CheckInUtils.withCheckIn("<monitor-slug>", "<environment-name>", () -> {
// Execute your scheduled task here...
return "computed result";
});
```

```kotlin
import io.sentry.MonitorSchedule
import io.sentry.MonitorScheduleUnit
import io.sentry.util.CheckInUtils

CheckInUtils.withCheckIn("<monitor-slug>", "<environment-name>") {
// Execute your scheduled task here...
}
```

### Manually sending check-ins

It is also possible to manually send check-ins.
Expand Down
Loading