@@ -19,6 +19,13 @@ defmodule Sentry.CheckIn do
19
19
20
20
alias Sentry . { Config , Interfaces , UUID }
21
21
22
+ @ doc """
23
+ The `sentry_check_in_configuration/1` function is called to set a specific config per check-in job.
24
+ See the `monitor_config` type to see the available configuration options
25
+
26
+ """
27
+ @ callback sentry_check_in_configuration ( options_to_merge :: term ( ) ) :: monitor_config ( )
28
+
22
29
@ typedoc """
23
30
The possible status of the check-in.
24
31
"""
@@ -50,18 +57,23 @@ defmodule Sentry.CheckIn do
50
57
duration: float ( ) | nil ,
51
58
release: String . t ( ) | nil ,
52
59
environment: String . t ( ) | nil ,
53
- monitor_config:
54
- nil
55
- | % {
56
- required ( :schedule ) => monitor_config_schedule ( ) ,
57
- optional ( :checkin_margin ) => number ( ) ,
58
- optional ( :max_runtime ) => number ( ) ,
59
- optional ( :failure_issue_threshold ) => number ( ) ,
60
- optional ( :recovery_threshold ) => number ( ) ,
61
- optional ( :timezone ) => String . t ( )
62
- } ,
60
+ monitor_config: monitor_config ( ) ,
63
61
contexts: Interfaces . context ( )
64
62
}
63
+ @ typedoc """
64
+ The type for the monitor_config.
65
+ """
66
+
67
+ @ type monitor_config ( ) ::
68
+ nil
69
+ | % {
70
+ required ( :schedule ) => monitor_config_schedule ( ) ,
71
+ optional ( :checkin_margin ) => number ( ) ,
72
+ optional ( :max_runtime ) => number ( ) ,
73
+ optional ( :failure_issue_threshold ) => number ( ) ,
74
+ optional ( :recovery_threshold ) => number ( ) ,
75
+ optional ( :timezone ) => String . t ( )
76
+ }
65
77
66
78
@ enforce_keys [
67
79
:check_in_id ,
0 commit comments