Skip to content

: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.

fix(appsignal): drop invalid severities field from log_incidents query (#126477)

Tom Owersf5c86d75739f
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/appsignal/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/appsignal/canonical_descriptions.py
index 5071b1ac0a37..ece6d747fc2e 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/appsignal/canonical_descriptions.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/appsignal/canonical_descriptions.py
@@ -87,7 +87,7 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {
"lastOccurredAt": "Time the incident last occurred.",
"createdAt": "Time the incident was first created.",
"updatedAt": "Time the incident was last updated.",
- "trigger": "Log line trigger that opened the incident, with its name, query, severities and log source IDs.",
+ "trigger": "Log line trigger that opened the incident, with its name, query and log source IDs.",
"logLine": "Most recent log line that matched the trigger.",
},
},
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/appsignal/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/appsignal/settings.py
index f17cfe620088..d6da4ba0ab58 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/appsignal/settings.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/appsignal/settings.py
@@ -141,7 +141,6 @@ APPSIGNAL_ENDPOINTS: dict[str, AppsignalEndpointConfig] = {
name
description
query
- severities
sourceIds
actionType
}
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/appsignal/tests/test_appsignal.py b/products/warehouse_sources/backend/temporal/data_imports/sources/appsignal/tests/test_appsignal.py
index edf969189f04..81a0036ed37b 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/appsignal/tests/test_appsignal.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/appsignal/tests/test_appsignal.py
@@ -212,6 +212,15 @@ class TestIncidentRows:
assert secret not in str(result.raised)
assert set(result.paths) == {"/graphql"}
+ def test_log_incidents_query_omits_the_invalid_severities_field(self) -> None:
+ # AppSignal's `LogLineActionTrigger` type has no `severities` field (only id, name,
+ # description, query, sourceIds, actionType, ...). Requesting it makes AppSignal's
+ # GraphQL server reject the whole query with a 400, failing every log_incidents sync.
+ result = _driver().run("log_incidents", [_graphql_page("logIncidents", [])])
+
+ assert result.raised is None
+ assert "severities" not in result.requests[0].json()["query"]
+
class TestAppsignalSourceResponse:
@pytest.mark.parametrize("endpoint", list(ENDPOINTS))