@@ -230,21 +230,26 @@ def validate(self, attrs):
230
230
return attrs
231
231
232
232
233
- @extend_schema_serializer (exclude_fields = ["project" , "name" , "slug" , " config" , "alert_rule" ])
233
+ @extend_schema_serializer (exclude_fields = ["project" , "config" , "alert_rule" ])
234
234
class MonitorValidator (CamelSnakeSerializer , PreventNumericSlugMixin ):
235
235
project = ProjectField (scope = "project:read" )
236
- name = serializers .CharField (max_length = 128 )
236
+ name = serializers .CharField (
237
+ max_length = 128 ,
238
+ help_text = "Name of the monitor. Used for notifications." ,
239
+ )
237
240
slug = serializers .RegexField (
238
241
DEFAULT_SLUG_PATTERN ,
239
242
max_length = MAX_SLUG_LENGTH ,
240
243
required = False ,
241
244
error_messages = {
242
245
"invalid" : DEFAULT_SLUG_ERROR_MESSAGE ,
243
246
},
247
+ help_text = "Uniquely identifies your monitor within your organization. Changing this slug will require updates to any instrumented check-in calls." ,
244
248
)
245
249
status = serializers .ChoiceField (
246
250
choices = list (zip (MONITOR_STATUSES .keys (), MONITOR_STATUSES .keys ())),
247
251
default = "active" ,
252
+ help_text = "Status of the monitor. Disabled monitors do not generate events or notifications." ,
248
253
)
249
254
type = serializers .ChoiceField (choices = list (zip (MONITOR_TYPES .keys (), MONITOR_TYPES .keys ())))
250
255
config = ConfigValidator ()
@@ -288,22 +293,28 @@ class ContextsValidator(serializers.Serializer):
288
293
trace = TraceContextValidator (required = False )
289
294
290
295
291
- @extend_schema_serializer (exclude_fields = ["duration" , "environment" , " monitor_config" , "contexts" ])
296
+ @extend_schema_serializer (exclude_fields = ["monitor_config" , "contexts" ])
292
297
class MonitorCheckInValidator (serializers .Serializer ):
293
298
status = serializers .ChoiceField (
294
299
choices = (
295
300
("ok" , CheckInStatus .OK ),
296
301
("error" , CheckInStatus .ERROR ),
297
302
("in_progress" , CheckInStatus .IN_PROGRESS ),
298
- )
303
+ ),
304
+ help_text = "The status of the job run." ,
299
305
)
300
306
duration = EmptyIntegerField (
301
307
required = False ,
302
308
allow_null = True ,
303
309
max_value = BoundedPositiveIntegerField .MAX_VALUE ,
304
310
min_value = 0 ,
311
+ help_text = "Duration of the job run, in milliseconds." ,
312
+ )
313
+ environment = serializers .CharField (
314
+ required = False ,
315
+ allow_null = True ,
316
+ help_text = "Name of the environment." ,
305
317
)
306
- environment = serializers .CharField (required = False , allow_null = True )
307
318
monitor_config = ConfigValidator (required = False )
308
319
contexts = ContextsValidator (required = False , allow_null = True )
309
320
0 commit comments