Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

U-4230 Make request_timeout for monitors docs more consistent and easier to parse #133

Merged
merged 2 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions docs/data-sources/betteruptime_monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,9 @@ Monitor lookup.
- **request_body** (String) Request body for POST, PUT, PATCH requests. Required if monitor_type is set to dns (domain to query the DNS server with).
- **request_headers** (List of Map of String) An array of request headers, consisting of name and value pairs
- **request_timeout** (Number) How long to wait before timing out the request?

- For Server and Port monitors (`ping`, `tcp`, `udp`, `smtp`, `pop`, `imap` and `dns`) timeout is specified in *milliseconds*. Valid options: 500, 1000, 2000, 3000, 5000.
- For all other monitor types timeout is specified in *seconds*. Valid options: 2, 3, 5, 10, 15, 30, 45, 60.

When monitor_type is set to playwright, this determines the Playwright scenario timeout instead. In *seconds*. Valid options: 15, 30, 45, 60
- For Server and Port monitors (types `ping`, `tcp`, `udp`, `smtp`, `pop`, `imap` and `dns`) the timeout is specified in *milliseconds*. Valid options: 500, 1000, 2000, 3000, 5000.
- For Playwright monitors (type `playwright`), this determines the Playwright scenario timeout instead in *seconds*. Valid options: 15, 30, 45, 60.
- For all other monitors, the timeout is specified in *seconds*. Valid options: 2, 3, 5, 10, 15, 30, 45, 60.
- **required_keyword** (String) Required if monitor_type is set to keyword or udp. We will create a new incident if this keyword is missing on your page.
- **scenario_name** (String) For Playwright monitors, the scenario name identifying the monitor in the UI.
- **sms** (Boolean) Should we send an SMS to the on-call person?
Expand Down
8 changes: 3 additions & 5 deletions docs/resources/betteruptime_monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,9 @@ https://betterstack.com/docs/uptime/api/monitors/
- **request_body** (String) Request body for POST, PUT, PATCH requests. Required if monitor_type is set to dns (domain to query the DNS server with).
- **request_headers** (List of Map of String) An array of request headers, consisting of name and value pairs
- **request_timeout** (Number) How long to wait before timing out the request?

- For Server and Port monitors (`ping`, `tcp`, `udp`, `smtp`, `pop`, `imap` and `dns`) timeout is specified in *milliseconds*. Valid options: 500, 1000, 2000, 3000, 5000.
- For all other monitor types timeout is specified in *seconds*. Valid options: 2, 3, 5, 10, 15, 30, 45, 60.

When monitor_type is set to playwright, this determines the Playwright scenario timeout instead. In *seconds*. Valid options: 15, 30, 45, 60
- For Server and Port monitors (types `ping`, `tcp`, `udp`, `smtp`, `pop`, `imap` and `dns`) the timeout is specified in *milliseconds*. Valid options: 500, 1000, 2000, 3000, 5000.
- For Playwright monitors (type `playwright`), this determines the Playwright scenario timeout instead in *seconds*. Valid options: 15, 30, 45, 60.
- For all other monitors, the timeout is specified in *seconds*. Valid options: 2, 3, 5, 10, 15, 30, 45, 60.
- **required_keyword** (String) Required if monitor_type is set to keyword or udp. We will create a new incident if this keyword is missing on your page.
- **scenario_name** (String) For Playwright monitors, the scenario name identifying the monitor in the UI.
- **sms** (Boolean) Should we send an SMS to the on-call person?
Expand Down
8 changes: 4 additions & 4 deletions internal/provider/resource_monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,10 @@ var monitorSchema = map[string]*schema.Schema{
// TODO: ValidateDiagFunc: validation.StringInSlice
},
"request_timeout": {
Description: "How long to wait before timing out the request?\n\n" +
" - For Server and Port monitors (`ping`, `tcp`, `udp`, `smtp`, `pop`, `imap` and `dns`) timeout is specified in *milliseconds*. Valid options: 500, 1000, 2000, 3000, 5000.\n" +
" - For all other monitor types timeout is specified in *seconds*. Valid options: 2, 3, 5, 10, 15, 30, 45, 60.\n\n" +
" When monitor_type is set to playwright, this determines the Playwright scenario timeout instead. In *seconds*. Valid options: 15, 30, 45, 60",
Description: "How long to wait before timing out the request?\n" +
" - For Server and Port monitors (types `ping`, `tcp`, `udp`, `smtp`, `pop`, `imap` and `dns`) the timeout is specified in *milliseconds*. Valid options: 500, 1000, 2000, 3000, 5000.\n" +
" - For Playwright monitors (type `playwright`), this determines the Playwright scenario timeout instead in *seconds*. Valid options: 15, 30, 45, 60.\n" +
" - For all other monitors, the timeout is specified in *seconds*. Valid options: 2, 3, 5, 10, 15, 30, 45, 60.\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The trailing newline is the actual fix, correct?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the trailing new line wasn't even necessary, the issue there was I believe the missing dashes, making the list end early. I think the trailing whitespace might even get trimmed when running make gen - not sure exactly, tbh.

I added the newline just so it's easy to copy paste the lines if more cases are added in the future.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Thanks for explaining 🙏

Type: schema.TypeInt,
Optional: true,
Computed: true,
Expand Down
Loading