-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
This issue is to add a timeout field to the monitor configuration DSL. This will allow users to specify a custom timeout for their monitors directly within their Synthetics project files.
Background
This change is a dependency for a feature being implemented in Kibana (elastic/kibana#234726) that allows users to set a custom browser timeout for monitors running on Private Locations. To support this for Project Monitors, the Synthetics agent's DSL must be updated to recognize and process this new field.
Acceptance Criteria
- A new optional
timeoutfield is added to theMonitorConfigtype. - The
timeoutfield must be astringthat conforms to the Gotime.Durationformat (e.g., "10s", "1m", "20ms"). - The agent correctly parses this value and applies it as the overall journey timeout.
- The
timeoutcan be set on an individualmonitorobject for monitor-specific overrides. - The
timeoutcan be set globally in thesynthetics.config.tsfile and will be inherited by all monitors unless overridden by a local setting.
Technical Action Items
-
Update Monitor DSL Definition
- In
src/dsl/monitor.ts, modify theMonitorConfigtype to include a new optional field:timeout?: string. - Add TSDoc comments to the new field explaining that the value should be a string representing a duration (e.g., "30s", "2m").
- In
-
Update Monitor Validation
- Enhance the validation logic to ensure that if a
timeoutvalue is provided, it is a valid duration string. While full regex validation might be overkill, a basic check for a number followed by a unit (s, m, ms) would be beneficial.
- Enhance the validation logic to ensure that if a
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Type
Fields
Give feedbackNo fields configured for issues without a type.