Skip to content

Commit e4f9928

Browse files
Savannah ManningSavannah Manning
authored andcommitted
inital addition of behaviour
1 parent 7414c9d commit e4f9928

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

lib/sentry/check_in.ex

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ defmodule Sentry.CheckIn do
1919

2020
alias Sentry.{Config, Interfaces, UUID}
2121

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+
2229
@typedoc """
2330
The possible status of the check-in.
2431
"""
@@ -50,18 +57,23 @@ defmodule Sentry.CheckIn do
5057
duration: float() | nil,
5158
release: String.t() | nil,
5259
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(),
6361
contexts: Interfaces.context()
6462
}
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+
}
6577

6678
@enforce_keys [
6779
:check_in_id,

0 commit comments

Comments
 (0)