Repository navigation
Expand file tree
/
Copy pathSentryCheckIn.java
More file actions
54 lines (48 loc) · 1.71 KB
/
Copy pathSentryCheckIn.java
File metadata and controls
54 lines (48 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package io.sentry.spring7.checkin;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import org.springframework.core.annotation.AliasFor;
/** Sends a {@link io.sentry.CheckIn} for the annotated method. */
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
public @interface SentryCheckIn {
/**
* Monitor slug. If not set, no check-in will be sent.
*
* @return monitor slug
*/
@AliasFor("value")
String monitorSlug() default "";
/**
* Whether to send only send heartbeat events.
*
* <p>A hearbeat check-in means there's no separate IN_PROGRESS check-in at the start of the jobs
* execution. Only the check-in after finishing the job will be sent.
*
* @return true if only heartbeat check-ins should be sent.
*/
boolean heartbeat() default false;
/**
* Whether to send the schedule and zone from the method's {@code @Scheduled} with check-ins, so
* Sentry creates or updates the monitor.
*
* <p>Heartbeat check-ins never send a monitor config.
*
* @return true to send a monitor config, false by default
*/
boolean upsertMonitorConfig() default false;
/**
* Monitor slug. If not set, no check-in will be sent.
*
* <p>Placeholders and SpEL expressions in the slug are resolved. If resolving fails, the
* unresolved slug is used, so check-ins go to a monitor that likely does not exist. The failure
* is only logged as a warning through {@link io.sentry.SentryOptions#getLogger()}, which by
* default prints only when debug is enabled.
*
* @return monitor slug
*/
@AliasFor("monitorSlug")
String value() default "";
}