:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(data-warehouse): add locations, private locations and error groups to checkly (#118992)
Tom Owers4f567edcf0f8
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md b/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.mdindex 4f0e0a1033c4..e7e9121da8cd 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md@@ -2422,17 +2422,17 @@ Note: Vendor's own swagger.json in the chatwoot/chatwoot repo, 90 paths. Coverag## Checkly — gaps-Today (5): `alert_channels`, `check_groups`, `check_results`, `check_statuses`, `checks`+Today (8): `alert_channels`, `check_groups`, `check_results`, `check_statuses`, `checks`, `error_groups`, `locations`, `private_locations`Diffed against: <https://api.checklyhq.com/openapi.json>-- [ ] `Locations (GET /v1/locations)` — resolve runLocation region codes in imported check results to readable location names (high)-- [ ] `Private locations (GET /v1/private-locations)` — identify private monitoring sites and compare agent availability (high)-- [ ] `Heartbeat events (GET /v1/checks/heartbeats/{checkId}/events)` — analyze missed heartbeats and recovery events for scheduled jobs (high)+- [x] `Locations (GET /v1/locations)` — resolve runLocation region codes in imported check results to readable location names (high). Added as `locations`.+- [x] `Private locations (GET /v1/private-locations)` — identify private monitoring sites and compare agent availability (high). Added as `private_locations`, without agent keys and proxy URLs.+- ~~`Heartbeat events (GET /v1/checks/heartbeats/{checkId}/events)` — analyze missed heartbeats and recovery events for scheduled jobs (high)~~ — skipped: the call returns at most 10 events per heartbeat and has no pagination, so a table would hold only the latest pings- [ ] `Reporting (GET /v1/reporting)` — compare official uptime and performance statistics across checks and groups (medium)- [ ] `Check alerts (GET /v1/check-alerts)` — measure alert frequency and recovery patterns for failing checks (medium)- [ ] `Alert notifications (GET /v1/alert-notifications)` — measure notification delivery failures and connect alerts with delivery channels (medium)-- [ ] `Error groups (GET /v1/error-groups)` — group recurring failures and measure their impact across checks (medium)+- [x] `Error groups (GET /v1/error-groups)` — group recurring failures and measure their impact across checks (medium). Added as `error_groups`, without raw error messages and root cause analyses.- [ ] `Status pages, incidents, and updates (GET /v3/status-pages; GET /v3/status-pages/{statusPageId}/incidents; GET /v3/status-pages/{statusPageId}/incidents/{incidentId}/incident-updates)` — track customer-visible incidents, recovery times, and communication history (medium)- [ ] `Test sessions (GET /v1/test-sessions)` — compare deployment and branch test outcomes across development workflows (medium)- [ ] `Usage series (GET /v1/usage/series)` — measure check consumption over time and attribute usage to accounts and check types (medium)diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/checkly/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/checkly/canonical_descriptions.pyindex c1e5ef475590..f794ea6c1963 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/checkly/canonical_descriptions.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/checkly/canonical_descriptions.py@@ -52,4 +52,35 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {"resultType": "Whether this result is final or a retry attempt.",},},+ "locations": {+ "description": "Public Checkly data center locations, used to resolve run location region codes to readable names.",+ "docs_url": "https://api.checklyhq.com/openapi.json",+ "columns": {"region": "Unique region code of the location.", "name": "Readable name of the location."},+ },+ "private_locations": {+ "description": "Private locations that run checks on agents hosted by the account. Agent keys and proxy URLs are excluded.",+ "docs_url": "https://api.checklyhq.com/openapi.json",+ "columns": {+ "id": "Unique private location ID.",+ "name": "Name of the private location.",+ "slugName": "Slug used to reference the private location in run locations.",+ "created_at": "Time when the private location was created.",+ "lastSeen": "Time when an agent of the private location last reported.",+ "agentCount": "Number of agents connected to the private location.",+ "minAgentVersion": "Lowest agent version connected to the private location.",+ },+ },+ "error_groups": {+ "description": "Recurring check errors grouped by their cleaned error message. Raw error messages and root cause analyses are excluded.",+ "docs_url": "https://api.checklyhq.com/openapi.json",+ "columns": {+ "id": "Unique error group ID.",+ "checkId": "ID of the check that produced the errors.",+ "errorHash": "Hash of the cleaned error message, used to group errors.",+ "cleanedErrorMessage": "Sanitized error message used for grouping.",+ "firstSeen": "Time when the error was first seen.",+ "lastSeen": "Time when the error was last seen.",+ "archivedUntilNextEvent": "Whether the group is archived until the error occurs again.",+ },+ },}diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/checkly/checkly.py b/products/warehouse_sources/backend/temporal/data_imports/sources/checkly/checkly.pyindex 2c5c793c51d9..80dbe89d799e 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/checkly/checkly.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/checkly/checkly.py@@ -91,6 +91,14 @@ _SAFE_FIELDS_BY_RESOURCE = {"checks": frozenset({"id", "name", "checkType", "groupId", "created_at"}),"check_groups": frozenset({"id", "name"}),"alert_channels": frozenset({"id", "type", "created_at"}),+ # Private locations carry raw agent keys and proxy URLs with credentials.+ "private_locations": frozenset(+ {"id", "name", "slugName", "icon", "created_at", "updated_at", "lastSeen", "agentCount", "minAgentVersion"}+ ),+ # The raw error message can echo request URLs, headers, or script output.+ "error_groups": frozenset(+ {"id", "checkId", "errorHash", "cleanedErrorMessage", "firstSeen", "lastSeen", "archivedUntilNextEvent"}+ ),}diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/checkly/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/checkly/settings.pyindex a737a87b08c3..3b97e0bc9ee9 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/checkly/settings.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/checkly/settings.py@@ -29,6 +29,9 @@ ENDPOINTS = {"check_statuses": ChecklyEndpoint(path="/v1/check-statuses", primary_keys=("checkId",), paginated=False),# v3 has no check-results route, so every version reads results from /v2."check_results": ChecklyEndpoint(path="/v2/check-results/{checkId}", primary_keys=("checkId", "id")),+ "locations": ChecklyEndpoint(path="/v1/locations", primary_keys=("region",), paginated=False),+ "private_locations": ChecklyEndpoint(path="/v1/private-locations", paginated=False),+ "error_groups": ChecklyEndpoint(path="/v1/error-groups"),}INCREMENTAL_FIELDS = {"check_results": [incremental_field("created_at")]}diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/checkly/tests/test_checkly.py b/products/warehouse_sources/backend/temporal/data_imports/sources/checkly/tests/test_checkly.pyindex 9505acfb1f31..4f908c4064e9 100644--- a/products/warehouse_sources/backend/temporal/data_imports/sources/checkly/tests/test_checkly.py+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/checkly/tests/test_checkly.py@@ -38,6 +38,7 @@ DRIVER = SourceDriver(ChecklySource(), CONFIG)("check_groups", "v3", "/v1/check-groups"),("alert_channels", "v2", "/v1/alert-channels"),("alert_channels", "v3", "/v1/alert-channels"),+ ("error_groups", "v3", "/v1/error-groups"),],)def test_list_pagination_auth_and_terminal_page(name: str, api_version: str, path: str) -> None:@@ -77,6 +78,8 @@ def test_list_pagination_auth_and_terminal_page(name: str, api_version: str, pat("checks", "v3"),("check_groups", "v2"),("alert_channels", "v2"),+ ("private_locations", "v3"),+ ("error_groups", "v3"),],)def test_definitions_project_only_safe_metadata(name: str, api_version: str) -> None:@@ -109,10 +112,14 @@ def test_definitions_project_only_safe_metadata(name: str, api_version: str) ->"newProviderField": "future-secret","requiredOutcomes": ["login succeeds"],"constraints": [{"type": "REQUIRED_OUTCOME", "value": "login succeeds"}],+ "keys": [{"id": "key-a", "rawKey": "pl_secret", "maskedKey": "...cret"}],+ "proxyUrl": "https://user:[email protected]:3128",+ "rawErrorMessage": "GET https://example.com/?token=secret failed",+ "rootCauseAnalyses": [{"analysis": "token=secret"}],}]),- ScriptedResponse(json=[]),+ *([] if name == "private_locations" else [ScriptedResponse(json=[])]),],api_version=api_version,)@@ -264,6 +271,9 @@ def test_rejects_invalid_pipeline_inputs(name: str, watermark: object, error: st(200, "alert_channels", True, None, "/v1/alert-channels"),(200, "check_groups", True, None, "/v1/check-groups"),(200, "check_statuses", True, None, "/v1/check-statuses"),+ (200, "locations", True, None, "/v1/locations"),+ (200, "private_locations", True, None, "/v1/private-locations"),+ (200, "error_groups", True, None, "/v1/error-groups"),],)def test_credential_probe_and_auth_errors(@@ -276,7 +286,9 @@ def test_credential_probe_and_auth_errors(assert result is validassert reason is None if message is None else message in (reason or "")assert [request.path for request in network.requests_log] == [path]- assert network.requests_log[0].query == ({} if schema == "check_statuses" else {"limit": ("1",)})+ assert network.requests_log[0].query == (+ {} if schema in ("check_statuses", "locations", "private_locations") else {"limit": ("1",)}+ )assert network.requests_log[0].headers["authorization"] == "Bearer fake-checkly-key"if not valid:assert reason in ChecklySource().get_non_retryable_errors().values()