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.

feat(new_relic): add javascript errors and alert incident and issue tables (#123046)

Tom Owerscdaf5d9a11b2
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.md
index 2da898b9729e..eb2f965debbd 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
@@ -8353,14 +8353,14 @@ Note: Official OpenAPI 2.0 spec (open-api.netlify.com/swagger.json, ~700 KB). Ho
## NewRelic — gaps
-Today (8): `alert_conditions`, `alert_policies`, `entities`, `logs`, `page_views`, `spans`, `transaction_errors`, `transactions`
+Today (11): `alert_conditions`, `alert_incidents`, `alert_issues`, `alert_policies`, `entities`, `javascript_errors`, `logs`, `page_views`, `spans`, `transaction_errors`, `transactions`
Diffed against: <https://docs.newrelic.com/attribute-dictionary/>
-- [ ] `NrAiIncident` — incident open/close history for the alert conditions already synced - the state-transition table that makes alert_conditions queryable (high)
+- [x] `NrAiIncident` — incident open/close history for the alert conditions already synced - the state-transition table that makes alert_conditions queryable (high)
- [ ] `Metric` — New Relic's dimensional metric timeslice data, the headline data type behind every APM/infra chart (high)
-- [ ] `JavaScriptError` — browser error events; the error-side counterpart to page_views, same way transaction_errors pairs with transactions (high)
-- [ ] `NrAiIssue` — correlated issue grouping over incidents, needed for MTTA/MTTR analysis (medium)
+- [x] `JavaScriptError` — browser error events; the error-side counterpart to page_views, same way transaction_errors pairs with transactions (high)
+- [x] `NrAiIssue` — correlated issue grouping over incidents, needed for MTTA/MTTR analysis (medium)
- [ ] `Deployment / ChangeTrackingEvent` — deployment and change markers to correlate releases with transaction/error regressions (medium)
- [ ] `MobileSession / MobileCrash / MobileRequest` — mobile monitoring events; no mobile coverage at all today (medium)
- [ ] `SyntheticCheck / SyntheticRequest` — synthetic monitor results for uptime and SLA reporting (medium)
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/new_relic/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/new_relic/canonical_descriptions.py
index 73a1446e6587..fa3409b3c0b8 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/new_relic/canonical_descriptions.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/new_relic/canonical_descriptions.py
@@ -46,6 +46,58 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {
"session": "Browser session identifier grouping page views from one visit.",
},
},
+ "javascript_errors": {
+ "description": "Browser JavaScriptError events: one row per uncaught JavaScript error captured by New Relic browser monitoring.",
+ "docs_url": "https://docs.newrelic.com/attribute-dictionary/?event=JavaScriptError",
+ "columns": {
+ "timestamp": "Time the error occurred.",
+ "appName": "Name of the browser application that reported the error.",
+ "errorClass": "Class name or type of the error.",
+ "errorMessage": "Message of the error.",
+ "stackTrace": "Call stack of the error.",
+ "pageUrl": "URL of the page where the error occurred, without query parameters.",
+ "session": "Browser session identifier grouping events from one visit.",
+ "userAgentName": "Browser name parsed from the user agent.",
+ "userAgentOS": "Operating system parsed from the user agent.",
+ "userAgentVersion": "Browser version parsed from the user agent.",
+ "browserInteractionId": "Browser interaction the error is linked to, when available.",
+ },
+ },
+ "alert_incidents": {
+ "description": "Alert NrAiIncident events: one row each time an alert incident opens or closes.",
+ "docs_url": "https://docs.newrelic.com/docs/alerts/create-alert/condition-details/alert-event-attributes/",
+ "columns": {
+ "timestamp": "Wall clock time of the open or close event.",
+ "event": "Record type: Open or Close.",
+ "incidentId": "Unique identifier of the incident. Open and Close rows share it.",
+ "accountId": "New Relic account where the incident occurred.",
+ "conditionId": "Alert condition that triggered the incident.",
+ "conditionName": "Name of the alert condition that triggered the incident.",
+ "policyId": "Alert policy that triggered the incident.",
+ "policyName": "Name of the alert policy that triggered the incident.",
+ "priority": "Level of the incident: warning or critical.",
+ "title": "Title of the incident.",
+ "openTime": "Time the incident opened.",
+ "closeTime": "Time the incident closed, if applicable.",
+ "closeCause": "What caused the incident to close, if applicable.",
+ "entity.guid": "Unique identifier of the targeted entity, if available.",
+ "entity.name": "Name of the targeted entity, if available.",
+ "nrqlQuery": "NRQL query of the condition that triggered the incident.",
+ "muted": "Whether the condition was muted during the incident.",
+ },
+ },
+ "alert_issues": {
+ "description": "Alert NrAiIssue events: one row per lifecycle change of an issue, which groups correlated incidents.",
+ "docs_url": "https://docs.newrelic.com/docs/alerts/create-alert/condition-details/alert-event-attributes/",
+ "columns": {
+ "timestamp": "Wall clock time of the issue event.",
+ "issueId": "Unique identifier of the issue.",
+ "event": "Issue lifecycle event, e.g. create, activate, acknowledge, or close.",
+ "activateTime": "Time the issue was activated.",
+ "acknowledgeTime": "Time the issue was acknowledged, if applicable.",
+ "closeTime": "Time the issue closed, if applicable.",
+ },
+ },
"logs": {
"description": "Log events forwarded to New Relic log management: one row per log line.",
"docs_url": "https://docs.newrelic.com/attribute-dictionary/?event=Log",
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/new_relic/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/new_relic/settings.py
index 1eed770e2054..181c3c35c14d 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/new_relic/settings.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/new_relic/settings.py
@@ -49,6 +49,27 @@ NEW_RELIC_ENDPOINTS: dict[str, NewRelicEndpointConfig] = {
incremental_fields=_TIMESTAMP_INCREMENTAL_FIELD,
description="Browser page view events. Only syncs the last 30 days on initial sync",
),
+ "javascript_errors": NewRelicEndpointConfig(
+ name="javascript_errors",
+ nrql_table="JavaScriptError",
+ partition_key="timestamp",
+ incremental_fields=_TIMESTAMP_INCREMENTAL_FIELD,
+ description="Browser JavaScript error events. Only syncs the last 30 days on initial sync",
+ ),
+ "alert_incidents": NewRelicEndpointConfig(
+ name="alert_incidents",
+ nrql_table="NrAiIncident",
+ partition_key="timestamp",
+ incremental_fields=_TIMESTAMP_INCREMENTAL_FIELD,
+ description="Alert incident open and close events. Only syncs the last 30 days on initial sync",
+ ),
+ "alert_issues": NewRelicEndpointConfig(
+ name="alert_issues",
+ nrql_table="NrAiIssue",
+ partition_key="timestamp",
+ incremental_fields=_TIMESTAMP_INCREMENTAL_FIELD,
+ description="Alert issue lifecycle events (created, activated, acknowledged, closed). Only syncs the last 30 days on initial sync",
+ ),
"logs": NewRelicEndpointConfig(
name="logs",
nrql_table="Log",
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/new_relic/tests/test_new_relic_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/new_relic/tests/test_new_relic_source.py
index af6d1c7e9ccb..1bb94c246778 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/new_relic/tests/test_new_relic_source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/new_relic/tests/test_new_relic_source.py
@@ -39,6 +39,9 @@ class TestNewRelicSource:
("transactions", True),
("transaction_errors", True),
("page_views", True),
+ ("javascript_errors", True),
+ ("alert_incidents", True),
+ ("alert_issues", True),
("logs", True),
("spans", True),
("entities", False),