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(warehouse_sources): add AppDynamics events, snapshots, health rules and metric paths (#98316)

Tom Owers46d54d2623b7
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 7cbce31fb88d..61ccd39d8580 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
@@ -355,14 +355,14 @@ Note: Reference index (96 slugs) read from the docs nav; each path below confirm
## Appdynamics — gaps
-Today (6): `applications`, `business_transactions`, `health_rule_violations`, `metric_data`, `nodes`, `tiers`
+Today (10): `applications`, `business_transactions`, `events`, `health_rule_violations`, `health_rules`, `metric_data`, `metrics`, `nodes`, `request_snapshots`, `tiers`
Diffed against: <https://help.splunk.com/en/appdynamics-saas/extend-splunk-appdynamics/26.4.0/extend-splunk-appdynamics/splunk-appdynamics-apis>
-- [ ] `/controller/rest/applications/{app}/events` — application event stream (deployments, restarts, errors, custom events) — the state-transition history behind every incident (high)
-- [ ] `/controller/alerting/rest/v1/applications/{id}/health-rules` — lookup resolving the health rule IDs/names carried on the health_rule_violations we already sync (high)
-- [ ] `/controller/rest/applications/{app}/request-snapshots` — individual slow/error transaction snapshots, the drill-down layer under business_transactions (high)
-- [ ] `/controller/rest/applications/{app}/metrics (metric tree browse)` — lookup of available metric paths — without it metric_data has to be hand-configured (high)
+- [x] `/controller/rest/applications/{app}/events` — application event stream (deployments, restarts, errors, custom events) — the state-transition history behind every incident (high)
+- [x] `/controller/alerting/rest/v1/applications/{id}/health-rules` — lookup resolving the health rule IDs/names carried on the health_rule_violations we already sync (high)
+- [x] `/controller/rest/applications/{app}/request-snapshots` — individual slow/error transaction snapshots, the drill-down layer under business_transactions (high)
+- [x] `/controller/rest/applications/{app}/metrics (metric tree browse)` — lookup of available metric paths — without it metric_data has to be hand-configured (high)
- [ ] `/controller/rest/applications/{app}/backends` — lookup for remote services/databases referenced by tiers and business transactions (high)
- [ ] `/controller/anomaly/rest/api/v1/applications/{id}/anomalies` — anomaly-detection violations, the ML counterpart to health rule violations (medium)
- [ ] `/events/query (Analytics Events API, ADQL)` — transaction/log/browser analytics records not exposed by the controller REST API (medium)
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/appdynamics.py b/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/appdynamics.py
index 8570b3850974..7494824821ee 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/appdynamics.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/appdynamics.py
@@ -20,6 +20,10 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.appdynamic
APPLICATIONS_PATH,
MAX_APPLICATIONS,
MAX_FANOUT_REQUESTS,
+ MAX_WINDOW_SPLITS,
+ METRIC_TREE_MAX_DEPTH,
+ METRIC_TREE_MAX_REQUESTS_PER_APPLICATION,
+ MIN_WINDOW_SPLIT_MS,
AppdynamicsEndpointConfig,
)
from products.warehouse_sources.backend.temporal.data_imports.sources.common.http import make_tracked_session
@@ -418,8 +422,9 @@ class AppdynamicsClient:
wait=wait_exponential_jitter(initial=1, max=30),
reraise=True,
)
- def get_json(self, path: str, params: dict[str, Any]) -> Any:
- # `output=JSON` is required on Controller REST endpoints — the default is XML.
+ def get_json(self, path: str, params: dict[str, Any], output_json: bool = True) -> Any:
+ # `output=JSON` is required on Controller REST endpoints — the default is XML. The
+ # alerting API serves JSON and defines no such parameter, so it opts out.
# The base URL is user-supplied; refuse redirects so a safe-looking host can't
# bounce us to an internal one (SSRF guard).
# `stream=True` keeps the body off the wire until we read it in bounded chunks below,
@@ -429,7 +434,7 @@ class AppdynamicsClient:
self._session,
lambda: self._session.get(
f"{self._base_url}{path}",
- params={**params, "output": "JSON"},
+ params={**params, "output": "JSON"} if output_json else params,
headers=self._headers(),
auth=self._basic_auth(),
timeout=REQUEST_TIMEOUT,
@@ -557,6 +562,131 @@ def _metric_rows(application_id: int, metric: dict[str, Any]) -> list[dict[str,
]
+def _window_params(start_ms: int, end_ms: int) -> dict[str, Any]:
+ return {"time-range-type": "BETWEEN_TIMES", "start-time": start_ms, "end-time": end_ms}
+
+
+class SplitAllowance:
+ """Extra requests window bisection may spend, shared by every window in one sync.
+
+ Splitting happens per window, but the fan-out limit is per sync. Without a shared
+ allowance a controller that returns a full response for every window would multiply an
+ already-accepted sync by the per-window split cap, which is how the limit gets bypassed.
+ """
+
+ def __init__(self, allowance: int) -> None:
+ self.remaining = max(allowance, 0)
+
+ def take(self) -> bool:
+ if self.remaining <= 0:
+ return False
+ self.remaining -= 1
+ return True
+
+
+def _get_window_rows(
+ client: AppdynamicsClient,
+ config: AppdynamicsEndpointConfig,
+ path: str,
+ base_params: dict[str, Any],
+ application_id: int,
+ window_start: int,
+ window_end: int,
+ split_allowance: SplitAllowance,
+ logger: FilteringBoundLogger,
+) -> Iterator[list[dict[str, Any]]]:
+ """Yield one time window's rows, bisecting the window when the response comes back capped.
+
+ `events` and `request-snapshots` return at most `result_cap` rows for a window and expose
+ no cursor to page past that, so a full response means rows were dropped. Halving the window
+ and refetching is the only way to reach them. Endpoints without a cap fetch once.
+ """
+ pending = [(window_start, window_end)]
+ splits = 0
+
+ while pending:
+ start, end = pending.pop()
+ rows = client.get_json(path, {**base_params, **_window_params(start, end)}) or []
+
+ if config.result_cap is not None and len(rows) >= config.result_cap:
+ # `take` spends from the sync-wide allowance, so ask for it last.
+ if end - start > MIN_WINDOW_SPLIT_MS and splits < MAX_WINDOW_SPLITS and split_allowance.take():
+ midpoint = start + (end - start) // 2
+ # Pushed newest-first so the older half pops first and rows stay in time order.
+ pending.extend([(midpoint, end), (start, midpoint)])
+ splits += 1
+ continue
+ logger.warning(
+ f"AppDynamics: '{config.name}' hit the {config.result_cap}-row response cap for "
+ f"application_id={application_id} between {start} and {end} and cannot be split further; "
+ "some rows in that window were not synced."
+ )
+
+ if rows:
+ yield [{**row, "application_id": application_id} for row in rows]
+
+
+def _escape_metric_path_segment(name: str) -> str:
+ """Escape a metric name so it survives being joined into a `metric-path` value.
+
+ The Controller reads `|` as the path separator and `\\` as its escape character, so a name
+ containing either has to be escaped before the path can be sent back in a request.
+ """
+ return name.replace("\\", "\\\\").replace("|", "\\|")
+
+
+def _get_metric_tree_rows(
+ client: AppdynamicsClient,
+ config: AppdynamicsEndpointConfig,
+ application_id: int,
+ logger: FilteringBoundLogger,
+) -> Iterator[list[dict[str, Any]]]:
+ """Walk one application's metric hierarchy, yielding a row per folder or metric found.
+
+ `/metrics` lists only the immediate children of a path, so each folder costs a request.
+ The hierarchy is unbounded, so the walk stops at `METRIC_TREE_MAX_DEPTH` and at the
+ per-application request budget.
+ """
+ path = config.path.format(application_id=application_id)
+ pending: list[tuple[str, int]] = [("", 0)]
+ requests_made = 0
+
+ while pending:
+ if requests_made >= METRIC_TREE_MAX_REQUESTS_PER_APPLICATION:
+ logger.warning(
+ f"AppDynamics: stopped walking the metric hierarchy for application_id={application_id} at the "
+ f"{METRIC_TREE_MAX_REQUESTS_PER_APPLICATION}-request budget; deeper metric paths were not listed."
+ )
+ return
+
+ parent_path, depth = pending.pop(0)
+ items = client.get_json(path, {"metric-path": parent_path} if parent_path else {}) or []
+ requests_made += 1
+
+ rows: list[dict[str, Any]] = []
+ for item in items:
+ name = item.get("name")
+ if not name:
+ continue
+ segment = _escape_metric_path_segment(name)
+ item_path = f"{parent_path}|{segment}" if parent_path else segment
+ rows.append(
+ {
+ "application_id": application_id,
+ "path": item_path,
+ "parent_path": parent_path or None,
+ "name": name,
+ "type": item.get("type"),
+ "depth": depth + 1,
+ }
+ )
+ if item.get("type") == "folder" and depth + 1 < METRIC_TREE_MAX_DEPTH:
+ pending.append((item_path, depth + 1))
+
+ if rows:
+ yield rows
+
+
def _window_start_ms(
config: AppdynamicsEndpointConfig,
end_ms: int,
@@ -578,17 +708,20 @@ def _get_windowed_application_rows(
start_ms: int,
end_ms: int,
metric_paths: list[str],
+ event_types: list[str],
resumable_source_manager: ResumableSourceManager[AppdynamicsResumeConfig],
+ split_allowance: SplitAllowance,
+ logger: FilteringBoundLogger,
) -> Iterator[list[dict[str, Any]]]:
path = config.path.format(application_id=application_id)
+ base_params: dict[str, Any] = dict(config.extra_params)
+ if config.is_events:
+ base_params["event-types"] = ",".join(event_types)
+
for window_start, window_end in _iter_windows(start_ms, end_ms, config.window_chunk_days):
- window_params = {
- "time-range-type": "BETWEEN_TIMES",
- "start-time": window_start,
- "end-time": window_end,
- }
if config.is_metric_data:
+ window_params = _window_params(window_start, window_end)
for metric_path in metric_paths:
metrics = client.get_json(path, {**window_params, "metric-path": metric_path, "rollup": "false"})
for metric in metrics or []:
@@ -596,9 +729,17 @@ def _get_windowed_application_rows(
if rows:
yield rows
else:
- rows = client.get_json(path, window_params)
- if rows:
- yield [{**row, "application_id": application_id} for row in rows]
+ yield from _get_window_rows(
+ client,
+ config,
+ path,
+ base_params,
+ application_id,
+ window_start,
+ window_end,
+ split_allowance,
+ logger,
+ )
# Save AFTER yielding the window so a crash re-yields it (merge dedupes on the
# primary key) rather than skipping it.
@@ -614,6 +755,7 @@ def get_rows(
logger: FilteringBoundLogger,
resumable_source_manager: ResumableSourceManager[AppdynamicsResumeConfig],
metric_paths: list[str],
+ event_types: list[str],
should_use_incremental_field: bool = False,
db_incremental_field_last_value: Any = None,
) -> Iterator[list[dict[str, Any]]]:
@@ -659,15 +801,29 @@ def get_rows(
num_windows = (
sum(1 for _ in _iter_windows(start_ms, end_ms, config.window_chunk_days)) if config.time_windowed else 1
)
- paths_factor = len(metric_paths) if config.is_metric_data else 1
- estimated_requests = len(application_ids) * paths_factor * num_windows
+ requests_per_application = num_windows
+ dimensions = [f"{len(application_ids)} applications"]
+ if config.is_metric_data:
+ requests_per_application *= len(metric_paths)
+ dimensions.append(f"{len(metric_paths)} metric paths")
+ if config.is_metric_tree:
+ requests_per_application *= METRIC_TREE_MAX_REQUESTS_PER_APPLICATION
+ dimensions.append(f"up to {METRIC_TREE_MAX_REQUESTS_PER_APPLICATION} metric hierarchy requests")
+ if config.time_windowed:
+ dimensions.append(f"{num_windows} time windows")
+
+ estimated_requests = len(application_ids) * requests_per_application
if estimated_requests > MAX_FANOUT_REQUESTS:
raise AppdynamicsError(
f"This AppDynamics sync would issue about {estimated_requests} requests "
- f"({len(application_ids)} applications × {paths_factor} metric paths × {num_windows} time windows), "
- f"above the {MAX_FANOUT_REQUESTS} limit for one sync. Reduce the metric paths or narrow the applications."
+ f"({' × '.join(dimensions)}), above the {MAX_FANOUT_REQUESTS} limit for one sync. "
+ "Reduce the metric paths or narrow the applications."
)
+ # Bisecting a capped window costs requests the estimate above cannot predict, so those
+ # draw from the same per-sync limit. Once the headroom is gone the windows stay whole.
+ split_allowance = SplitAllowance(MAX_FANOUT_REQUESTS - estimated_requests)
+
for index, application_id in enumerate(remaining):
if config.time_windowed:
# Only the resumed-into application uses the saved window; the rest start fresh.
@@ -680,10 +836,19 @@ def get_rows(
application_start,
end_ms,
metric_paths,
+ event_types,
resumable_source_manager,
+ split_allowance,
+ logger,
)
+ elif config.is_metric_tree:
+ yield from _get_metric_tree_rows(client, config, application_id, logger)
else:
- rows = client.get_json(config.path.format(application_id=application_id), {})
+ rows = client.get_json(
+ config.path.format(application_id=application_id),
+ {},
+ output_json=config.sends_output_json_param,
+ )
if rows:
yield [{**row, "application_id": application_id} for row in rows]
@@ -703,6 +868,7 @@ def appdynamics_source(
resumable_source_manager: ResumableSourceManager[AppdynamicsResumeConfig],
team_id: int,
metric_paths: list[str],
+ event_types: list[str],
should_use_incremental_field: bool = False,
db_incremental_field_last_value: Optional[Any] = None,
) -> SourceResponse:
@@ -718,6 +884,7 @@ def appdynamics_source(
logger=logger,
resumable_source_manager=resumable_source_manager,
metric_paths=metric_paths,
+ event_types=event_types,
should_use_incremental_field=should_use_incremental_field,
db_incremental_field_last_value=db_incremental_field_last_value,
),
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/canonical_descriptions.py
index acbb3d9ae988..34e08dbc4cf5 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/canonical_descriptions.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/canonical_descriptions.py
@@ -100,4 +100,77 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {
"useRange": "Whether min/max carry meaningful range information for this metric.",
},
},
+ "events": {
+ "description": "Application events such as deployments, server restarts, configuration changes, application errors, diagnostic sessions and health rule violation state changes.",
+ "docs_url": _DOCS_URL,
+ "columns": {
+ "application_id": "Identifier of the application the event was reported for.",
+ "id": "Unique identifier of the event within the controller.",
+ "type": "Event type (e.g. APPLICATION_DEPLOYMENT, APP_SERVER_RESTART, POLICY_OPEN_CRITICAL).",
+ "subType": "Sub-type of the event, where the event type defines one.",
+ "eventTime": "Epoch-ms timestamp when the event occurred.",
+ "severity": "Severity of the event (INFO, WARN, or ERROR).",
+ "summary": "Human-readable summary of the event.",
+ "affectedEntities": "Entities (application, tier, node, business transaction) the event affects.",
+ "triggeredEntity": "Entity that triggered the event, where one is recorded.",
+ "markedAsRead": "Whether the event has been marked as read in the controller UI.",
+ "markedAsResolved": "Whether the event has been marked as resolved in the controller UI.",
+ "archived": "Whether the event has been archived.",
+ "deepLinkUrl": "Link to the event in the AppDynamics controller UI.",
+ },
+ },
+ "request_snapshots": {
+ "description": "Transaction snapshots capturing individual slow, stalled or error requests, the drill-down detail behind business transaction metrics.",
+ "docs_url": _DOCS_URL,
+ "columns": {
+ "application_id": "Identifier of the application the request ran in.",
+ "id": "Unique identifier of the request segment within the controller.",
+ "requestGUID": "GUID correlating the segments of one distributed request.",
+ "businessTransactionId": "Identifier of the business transaction the request belongs to.",
+ "applicationComponentId": "Identifier of the tier that served the segment.",
+ "applicationComponentNodeId": "Identifier of the node that served the segment.",
+ "serverStartTime": "Epoch-ms timestamp when the segment started on the server.",
+ "localStartTime": "Epoch-ms timestamp when the segment started, in the node's local time.",
+ "timeTakenInMilliSecs": "Wall-clock time the segment took, in milliseconds.",
+ "cpuTimeTakenInMilliSecs": "CPU time the segment consumed, in milliseconds.",
+ "userExperience": "Experience bucket of the request (NORMAL, SLOW, VERY_SLOW, STALL, or ERROR).",
+ "errorOccured": "Whether an error was recorded on the segment.",
+ "errorIDs": "Identifiers of the errors recorded on the segment.",
+ "errorSummary": "Summary of the error recorded on the segment.",
+ "firstInChain": "Whether the segment is the entry point of the request.",
+ "callChain": "Call chain describing how the segment was reached.",
+ "async": "Whether the segment ran asynchronously.",
+ "threadID": "Identifier of the thread that ran the segment.",
+ "threadName": "Name of the thread that ran the segment.",
+ "URL": "URL of the request, for HTTP entry points.",
+ "httpSessionID": "HTTP session identifier of the request.",
+ "userPrincipalID": "Authenticated user the request ran as, where captured.",
+ "summary": "Summary of the snapshot.",
+ "hasDeepDiveData": "Whether a full call graph was captured for the segment.",
+ "deepDivePolicy": "Reason the snapshot was captured (e.g. SLA_FAILURE, TIME_SAMPLING, ON_DEMAND).",
+ "archived": "Whether the snapshot has been archived.",
+ "diagnosticSessionGUID": "GUID of the diagnostic session that captured the snapshot.",
+ },
+ },
+ "health_rules": {
+ "description": "Health rules defined for each application. Joins to health_rule_violations to resolve the rule behind a violation.",
+ "docs_url": "https://help.splunk.com/en/appdynamics-saas/extend-splunk-appdynamics/26.4.0/extend-splunk-appdynamics/splunk-appdynamics-apis",
+ "columns": {
+ "application_id": "Identifier of the application the health rule is defined in.",
+ "id": "Unique identifier of the health rule within the controller.",
+ "name": "Name of the health rule, as shown on its violations.",
+ },
+ },
+ "metrics": {
+ "description": "Metric paths available in each application's metric browser, one row per folder or metric found while walking the hierarchy.",
+ "docs_url": _DOCS_URL,
+ "columns": {
+ "application_id": "Identifier of the application the metric path belongs to.",
+ "path": "Full metric path, ready to paste into the source's metric paths setting.",
+ "parent_path": "Metric path of the parent folder, empty for top-level items.",
+ "name": "Name of the folder or metric.",
+ "type": "Whether the item is a 'folder' holding more metrics or a 'leaf' metric.",
+ "depth": "How many levels below the metric browser root the item sits.",
+ },
+ },
}
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/settings.py
index 06116185fadb..a5994a9797a3 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/settings.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/settings.py
@@ -1,4 +1,7 @@
-from dataclasses import dataclass, field
+from dataclasses import field
+from typing import Any
+
+from posthog.dataclasses import frozen
from products.warehouse_sources.backend.types import IncrementalField, IncrementalFieldType
@@ -27,20 +30,69 @@ MAX_APPLICATIONS = 1000
# (max applications × max metric paths × the 7-day metric window) lands well above it.
MAX_FANOUT_REQUESTS = 100_000
-# The Controller's time-windowed endpoints filter server-side on epoch-ms `start-time` /
-# `end-time` (`time-range-type=BETWEEN_TIMES`), so the row's `startTimeInMillis` is the
-# only reliable incremental cursor. There is no `updated-since` filter on any endpoint.
-TIME_WINDOW_INCREMENTAL_FIELDS: list[IncrementalField] = [
- {
- "label": "startTimeInMillis",
- "type": IncrementalFieldType.Integer,
- "field": "startTimeInMillis",
- "field_type": IncrementalFieldType.Integer,
- },
+# The Controller caps `events` and `request-snapshots` responses at 600 rows and offers no
+# cursor to page past that, so a window that comes back full is assumed truncated and gets
+# bisected until each half fits (see `_get_window_rows`).
+MAX_ROWS_PER_TIME_WINDOW = 600
+
+# Bounds on that bisection: stop splitting once a window is under a minute (a minute that
+# still overflows 600 rows cannot be recovered by splitting further), and cap the extra
+# requests one top-level window may cost so a firehose application can't monopolize a worker.
+MIN_WINDOW_SPLIT_MS = 60 * 1000
+MAX_WINDOW_SPLITS = 64
+
+# Event types synced when the user leaves the "Event types" field empty: deployments,
+# restarts, config changes, application errors, diagnostic sessions and the health rule
+# violation state transitions. `event-types` is a required parameter with no "all" value,
+# and the Controller rejects the whole request if any type is unknown, so the default
+# stays on long-standing types and users add the rest themselves.
+DEFAULT_EVENT_TYPES = [
+ "APPLICATION_DEPLOYMENT",
+ "APP_SERVER_RESTART",
+ "APPLICATION_CONFIG_CHANGE",
+ "APPLICATION_ERROR",
+ "DIAGNOSTIC_SESSION",
+ "CUSTOM",
+ "POLICY_OPEN_WARNING",
+ "POLICY_OPEN_CRITICAL",
+ "POLICY_UPGRADED",
+ "POLICY_DOWNGRADED",
+ "POLICY_CLOSE_WARNING",
+ "POLICY_CLOSE_CRITICAL",
]
+# `event-types` rides in the query string, so an unbounded list would also build an
+# unbounded URL. Well past the number of event types the Controller defines.
+MAX_EVENT_TYPES = 200
+
+# `severities` is required too, and every severity is wanted for an event history.
+EVENT_SEVERITIES = "INFO,WARN,ERROR"
+
+# `/metrics` returns only the immediate children of a path, so browsing the tree costs one
+# request per folder. The hierarchy is unbounded (a folder per tier, node and business
+# transaction), so bound both how deep the walk goes and what it may spend per application.
+METRIC_TREE_MAX_DEPTH = 3
+METRIC_TREE_MAX_REQUESTS_PER_APPLICATION = 100
+
+
+# The Controller's time-windowed endpoints filter server-side on epoch-ms `start-time` /
+# `end-time` (`time-range-type=BETWEEN_TIMES`), so each endpoint's own epoch-ms start field
+# is the only reliable incremental cursor. There is no `updated-since` filter on any endpoint.
+def time_window_incremental_fields(field_name: str) -> list[IncrementalField]:
+ return [
+ {
+ "label": field_name,
+ "type": IncrementalFieldType.Integer,
+ "field": field_name,
+ "field_type": IncrementalFieldType.Integer,
+ },
+ ]
-@dataclass
+
+TIME_WINDOW_INCREMENTAL_FIELDS: list[IncrementalField] = time_window_incremental_fields("startTimeInMillis")
+
+
+@frozen
class AppdynamicsEndpointConfig:
name: str
"""Stream name shown to the user."""
@@ -55,6 +107,16 @@ class AppdynamicsEndpointConfig:
"""Endpoint requires `time-range-type=BETWEEN_TIMES` with epoch-ms start/end params."""
is_metric_data: bool = False
"""Metric-data responses nest `metricValues` per metric; rows are flattened out of them."""
+ is_events: bool = False
+ """Events requests carry the required `event-types` list configured on the source."""
+ is_metric_tree: bool = False
+ """Walk the metric hierarchy folder by folder instead of reading one list response."""
+ result_cap: int | None = None
+ """Rows the endpoint returns per request at most. A window at the cap is bisected."""
+ extra_params: dict[str, Any] = field(default_factory=dict)
+ """Static query params this endpoint always sends."""
+ sends_output_json_param: bool = True
+ """Controller REST defaults to XML; the alerting API serves JSON and has no such param."""
default_lookback_days: int = 30
"""First-sync / full-refresh window for time-windowed endpoints."""
window_chunk_days: int = 7
@@ -117,6 +179,61 @@ APPDYNAMICS_ENDPOINTS: dict[str, AppdynamicsEndpointConfig] = {
"Only syncs the last 7 days on initial sync."
),
),
+ "events": AppdynamicsEndpointConfig(
+ name="events",
+ path="/controller/rest/applications/{application_id}/events",
+ primary_keys=["application_id", "id"],
+ fan_out_over_applications=True,
+ time_windowed=True,
+ is_events=True,
+ incremental_fields=time_window_incremental_fields("eventTime"),
+ default_lookback_days=30,
+ window_chunk_days=1,
+ result_cap=MAX_ROWS_PER_TIME_WINDOW,
+ extra_params={"severities": EVENT_SEVERITIES},
+ description=(
+ "Application events (deployments, restarts, config changes, errors, diagnostic "
+ "sessions and health rule violation state changes) synced by their event time. "
+ "Syncs the event types configured on the source. Only syncs the last 30 days on "
+ "initial sync."
+ ),
+ ),
+ "request_snapshots": AppdynamicsEndpointConfig(
+ name="request_snapshots",
+ path="/controller/rest/applications/{application_id}/request-snapshots",
+ primary_keys=["application_id", "id"],
+ fan_out_over_applications=True,
+ time_windowed=True,
+ incremental_fields=time_window_incremental_fields("serverStartTime"),
+ default_lookback_days=3,
+ window_chunk_days=1,
+ result_cap=MAX_ROWS_PER_TIME_WINDOW,
+ extra_params={"maximum-results": MAX_ROWS_PER_TIME_WINDOW},
+ description=(
+ "Transaction snapshots for slow, stalled and error requests, synced by the time "
+ "the request started on the server. Only syncs the last 3 days on initial sync."
+ ),
+ ),
+ "health_rules": AppdynamicsEndpointConfig(
+ name="health_rules",
+ path="/controller/alerting/rest/v1/applications/{application_id}/health-rules",
+ primary_keys=["application_id", "id"],
+ fan_out_over_applications=True,
+ sends_output_json_param=False,
+ description="Health rules defined for each application, resolving the rule names on health rule violations.",
+ ),
+ "metrics": AppdynamicsEndpointConfig(
+ name="metrics",
+ path="/controller/rest/applications/{application_id}/metrics",
+ primary_keys=["application_id", "path"],
+ fan_out_over_applications=True,
+ is_metric_tree=True,
+ description=(
+ "Metric paths available in each application's metric browser, one row per folder "
+ "or metric. Use a path from here in the source's metric paths setting to sync its "
+ "time series into metric_data."
+ ),
+ ),
}
ENDPOINTS = tuple(APPDYNAMICS_ENDPOINTS.keys())
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/source.py
index da20966b2558..f61a7652e03e 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/source.py
@@ -19,9 +19,11 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.appdynamic
)
from products.warehouse_sources.backend.temporal.data_imports.sources.appdynamics.settings import (
APPDYNAMICS_ENDPOINTS,
+ DEFAULT_EVENT_TYPES,
DEFAULT_METRIC_PATHS,
ENDPOINTS,
INCREMENTAL_FIELDS,
+ MAX_EVENT_TYPES,
MAX_METRIC_PATHS,
)
from products.warehouse_sources.backend.temporal.data_imports.sources.common.base import FieldType, ResumableSource
@@ -60,7 +62,7 @@ class AppdynamicsSource(ResumableSource[AppdynamicsSourceConfig, AppdynamicsResu
label="Splunk AppDynamics (Cisco)",
releaseStatus=ReleaseStatus.ALPHA,
keywords=["appdynamics", "cisco", "splunk", "apm"],
- caption="""Sync your Splunk AppDynamics (Cisco) APM data (applications, business transactions, tiers, nodes, health rule violations, and metric time series) into the PostHog Data warehouse.
+ caption="""Sync your Splunk AppDynamics (Cisco) APM data (applications, business transactions, tiers, nodes, events, transaction snapshots, health rules, health rule violations, metric paths, and metric time series) into the PostHog Data warehouse.
Enter your controller URL (e.g. `https://mycompany.saas.appdynamics.com`) and your account name, then authenticate with an OAuth API client (recommended) or a username and password.
@@ -152,6 +154,14 @@ You can create an API client in your controller under **Administration → API C
placeholder="Overall Application Performance|*",
secret=False,
),
+ SourceFieldInputConfig(
+ name="event_types",
+ label="Event types (one per line)",
+ type=SourceFieldInputConfigType.TEXTAREA,
+ required=False,
+ placeholder="APPLICATION_DEPLOYMENT",
+ secret=False,
+ ),
],
),
)
@@ -169,6 +179,7 @@ You can create an API client in your controller under **Administration → API C
"403 Client Error": "Your AppDynamics user or API client is missing read access to application data. Grant the required roles and try again.",
"AppDynamics OAuth token request failed": "Your AppDynamics API client credentials were rejected. Check your API client name, client secret, and account name, then reconnect.",
"Too many metric paths configured": None,
+ "Too many event types configured": None,
"Too many AppDynamics applications": None,
"AppDynamics sync would issue": None,
}
@@ -200,6 +211,12 @@ You can create an API client in your controller under **Administration → API C
)
return paths or list(DEFAULT_METRIC_PATHS)
+ def _event_types_for_config(self, config: AppdynamicsSourceConfig) -> list[str]:
+ types: list[str] = [line.strip() for line in (config.event_types or "").splitlines() if line.strip()]
+ if len(types) > MAX_EVENT_TYPES:
+ raise ValueError(f"Too many event types configured ({len(types)}); the maximum is {MAX_EVENT_TYPES}.")
+ return types or list(DEFAULT_EVENT_TYPES)
+
def get_schemas(
self,
config: AppdynamicsSourceConfig,
@@ -234,6 +251,7 @@ You can create an API client in your controller under **Administration → API C
try:
auth = self._auth_for_config(config)
self._metric_paths_for_config(config)
+ self._event_types_for_config(config)
except ValueError as exc:
return False, str(exc)
@@ -256,6 +274,7 @@ You can create an API client in your controller under **Administration → API C
resumable_source_manager=resumable_source_manager,
team_id=inputs.team_id,
metric_paths=self._metric_paths_for_config(config),
+ event_types=self._event_types_for_config(config),
should_use_incremental_field=inputs.should_use_incremental_field,
db_incremental_field_last_value=inputs.db_incremental_field_last_value
if inputs.should_use_incremental_field
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/tests/test_appdynamics.py b/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/tests/test_appdynamics.py
index c8fa8763edde..450ac1383940 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/tests/test_appdynamics.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/tests/test_appdynamics.py
@@ -28,6 +28,9 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.appdynamic
from products.warehouse_sources.backend.temporal.data_imports.sources.appdynamics.settings import (
APPDYNAMICS_ENDPOINTS,
MAX_METRIC_PATHS,
+ MAX_ROWS_PER_TIME_WINDOW,
+ METRIC_TREE_MAX_DEPTH,
+ METRIC_TREE_MAX_REQUESTS_PER_APPLICATION,
)
BASE_URL = "https://acme.saas.appdynamics.com"
@@ -379,6 +382,8 @@ def _run_get_rows(
endpoint: str,
manager: FakeResumeManager,
metric_paths: list[str] | None = None,
+ event_types: list[str] | None = None,
+ logger: Any = None,
**kwargs: Any,
) -> tuple[list[list[dict[str, Any]]], FakeSession]:
session = FakeSession(responder=responder)
@@ -388,15 +393,27 @@ def _run_get_rows(
base_url=BASE_URL,
endpoint=endpoint,
auth=BASIC_AUTH,
- logger=mock.MagicMock(),
+ logger=logger or mock.MagicMock(),
resumable_source_manager=manager, # type: ignore[arg-type]
metric_paths=metric_paths or ["Overall Application Performance|*"],
+ event_types=event_types or ["APPLICATION_DEPLOYMENT"],
**kwargs,
)
)
return batches, session
+def _application_list_responder(tree: dict[str, Any], application_ids: list[int] | None = None) -> Any:
+ """Serve the application list, then look each later request up by its `metric-path`."""
+
+ def responder(path: str, params: dict[str, Any]) -> FakeResponse:
+ if path == "/controller/rest/applications":
+ return FakeResponse(json_data=[{"id": app_id} for app_id in (application_ids or [1])])
+ return FakeResponse(json_data=tree.get(params.get("metric-path", ""), []))
+
+ return responder
+
+
class TestGetRows:
def test_applications_yields_rows_without_state(self) -> None:
manager = FakeResumeManager()
@@ -423,6 +440,17 @@ class TestGetRows:
with pytest.raises(AppdynamicsError):
_run_get_rows(lambda path, params: FakeResponse(json_data=apps), "metric_data", manager, metric_paths=paths)
+ def test_metric_tree_fan_out_budget_counts_the_per_application_request_cap(self) -> None:
+ # Browsing the hierarchy costs many requests per application, so the budget check has
+ # to multiply by that cap rather than assume one request per application.
+ applications = 10
+ apps = [{"id": i} for i in range(applications)]
+ manager = FakeResumeManager()
+ budget = applications * METRIC_TREE_MAX_REQUESTS_PER_APPLICATION - 1
+ with mock.patch.object(appdynamics_module, "MAX_FANOUT_REQUESTS", budget):
+ with pytest.raises(AppdynamicsError):
+ _run_get_rows(lambda path, params: FakeResponse(json_data=apps), "metrics", manager)
+
def test_duplicate_application_ids_are_deduplicated(self) -> None:
def responder(path: str, params: dict[str, Any]) -> FakeResponse:
if path == "/controller/rest/applications":
@@ -583,6 +611,183 @@ class TestGetRows:
assert rows[0]["metricId"] == 42
assert rows[0]["value"] == 12
+ @freeze_time("2024-01-31T00:00:00Z")
+ def test_capped_window_is_bisected_until_every_slice_fits(self) -> None:
+ # `events` returns at most 600 rows for a window and offers no cursor to reach the rest,
+ # so a full response means rows were dropped: the window has to be halved and refetched.
+ quarter_day = MILLIS_PER_DAY // 4
+ requested: list[tuple[int, int]] = []
+
+ def responder(path: str, params: dict[str, Any]) -> FakeResponse:
+ if path == "/controller/rest/applications":
+ return FakeResponse(json_data=[{"id": 1}])
+ start, end = params["start-time"], params["end-time"]
+ requested.append((start, end))
+ count = MAX_ROWS_PER_TIME_WINDOW if end - start > quarter_day else 2
+ return FakeResponse(json_data=[{"id": f"{start}-{i}", "eventTime": start} for i in range(count)])
+
+ watermark = FROZEN_NOW_MS - MILLIS_PER_DAY
+ manager = FakeResumeManager()
+ batches, _ = _run_get_rows(
+ responder,
+ "events",
+ manager,
+ should_use_incremental_field=True,
+ db_incremental_field_last_value=watermark,
+ )
+
+ # One full window, two halves, four quarters; only the quarters come back under the cap.
+ assert len(requested) == 7
+ accepted = [(start, end) for start, end in requested if end - start <= quarter_day]
+ assert len(accepted) == 4
+ # The accepted slices must tile the original window exactly: no gap, no overlap.
+ assert accepted == sorted(accepted)
+ assert accepted[0][0] == watermark + 1
+ assert accepted[-1][1] == FROZEN_NOW_MS
+ assert all(end == next_start for (_, end), (next_start, _) in zip(accepted, accepted[1:]))
+ # Rows still arrive oldest-first even though the slices were discovered out of order.
+ event_times = [row["eventTime"] for batch in batches for row in batch]
+ assert event_times == sorted(event_times)
+ assert len(event_times) == 8
+
+ @freeze_time("2024-01-31T00:00:00Z")
+ def test_window_that_cannot_be_split_further_warns_and_keeps_its_rows(self) -> None:
+ def responder(path: str, params: dict[str, Any]) -> FakeResponse:
+ if path == "/controller/rest/applications":
+ return FakeResponse(json_data=[{"id": 1}])
+ return FakeResponse(json_data=[{"id": i} for i in range(MAX_ROWS_PER_TIME_WINDOW)])
+
+ logger = mock.MagicMock()
+ manager = FakeResumeManager()
+ with mock.patch.object(appdynamics_module, "MAX_WINDOW_SPLITS", 0):
+ batches, session = _run_get_rows(
+ responder,
+ "events",
+ manager,
+ logger=logger,
+ should_use_incremental_field=True,
+ db_incremental_field_last_value=FROZEN_NOW_MS - MILLIS_PER_DAY,
+ )
+
+ assert len(session.get_calls) == 2 # the application list, then one un-split window
+ assert len(batches[0]) == MAX_ROWS_PER_TIME_WINDOW
+ assert logger.warning.call_count == 1
+
+ @freeze_time("2024-01-31T00:00:00Z")
+ def test_splitting_draws_from_the_sync_wide_request_allowance(self) -> None:
+ # Splitting is per window but the fan-out limit is per sync, so a controller that
+ # returns a full response every time must not multiply an accepted sync by the
+ # per-window split cap.
+ def responder(path: str, params: dict[str, Any]) -> FakeResponse:
+ if path == "/controller/rest/applications":
+ return FakeResponse(json_data=[{"id": 1}])
+ return FakeResponse(json_data=[{"id": i} for i in range(MAX_ROWS_PER_TIME_WINDOW)])
+
+ logger = mock.MagicMock()
+ # One window is estimated, so an allowance of one leaves room for a single split.
+ with mock.patch.object(appdynamics_module, "MAX_FANOUT_REQUESTS", 2):
+ _, session = _run_get_rows(
+ responder,
+ "events",
+ FakeResumeManager(),
+ logger=logger,
+ should_use_incremental_field=True,
+ db_incremental_field_last_value=FROZEN_NOW_MS - MILLIS_PER_DAY,
+ )
+
+ # The whole window, then its two halves; neither half may split again.
+ assert len(session.get_calls) == 1 + 3
+ assert logger.warning.call_count == 2
+
+ @parameterized.expand(
+ [
+ ("events", {"event-types": "APPLICATION_DEPLOYMENT,APP_SERVER_RESTART", "severities": "INFO,WARN,ERROR"}),
+ ("request_snapshots", {"maximum-results": MAX_ROWS_PER_TIME_WINDOW}),
+ ]
+ )
+ @freeze_time("2024-01-31T00:00:00Z")
+ def test_windowed_endpoint_sends_its_required_params(self, endpoint: str, expected: dict[str, Any]) -> None:
+ # The Controller rejects an events request with no `event-types`/`severities`, and caps
+ # snapshots at its own default unless `maximum-results` is asked for.
+ def responder(path: str, params: dict[str, Any]) -> FakeResponse:
+ if path == "/controller/rest/applications":
+ return FakeResponse(json_data=[{"id": 1}])
+ return FakeResponse(json_data=[])
+
+ _, session = _run_get_rows(
+ responder,
+ endpoint,
+ FakeResumeManager(),
+ event_types=["APPLICATION_DEPLOYMENT", "APP_SERVER_RESTART"],
+ should_use_incremental_field=True,
+ db_incremental_field_last_value=FROZEN_NOW_MS - MILLIS_PER_DAY,
+ )
+
+ _, params, _ = session.get_calls[1]
+ assert expected.items() <= params.items()
+
+ def test_health_rules_omits_the_controller_rest_output_param(self) -> None:
+ # The alerting API serves JSON and defines no `output` param; the Controller REST API does.
+ _, session = _run_get_rows(
+ _application_list_responder({}, application_ids=[7]), "health_rules", FakeResumeManager()
+ )
+
+ _, list_params, _ = session.get_calls[0]
+ rules_path, rules_params, _ = session.get_calls[1]
+ assert list_params["output"] == "JSON"
+ assert rules_path == "/controller/alerting/rest/v1/applications/7/health-rules"
+ assert "output" not in rules_params
+
+ def test_metric_tree_walk_builds_reusable_paths_and_skips_leaves(self) -> None:
+ tree = {
+ "": [
+ {"name": "Overall Application Performance", "type": "folder"},
+ {"name": "Errors|Total", "type": "leaf"},
+ ],
+ "Overall Application Performance": [{"name": "Average Response Time (ms)", "type": "leaf"}],
+ }
+ batches, session = _run_get_rows(_application_list_responder(tree), "metrics", FakeResumeManager())
+ rows = [row for batch in batches for row in batch]
+
+ # A `|` inside a metric name is escaped, so the path can be sent back as a `metric-path`.
+ assert [row["path"] for row in rows] == [
+ "Overall Application Performance",
+ "Errors\\|Total",
+ "Overall Application Performance|Average Response Time (ms)",
+ ]
+ assert [row["depth"] for row in rows] == [1, 1, 2]
+ assert rows[2]["parent_path"] == "Overall Application Performance"
+ assert all(row["application_id"] == 1 for row in rows)
+ # Only the folder is expanded: the root listing plus one request for it.
+ assert [params.get("metric-path") for _, params, _ in session.get_calls[1:]] == [
+ None,
+ "Overall Application Performance",
+ ]
+
+ def test_metric_tree_walk_stops_at_the_depth_limit(self) -> None:
+ # The hierarchy is unbounded, so an all-folders tree must not be walked forever.
+ tree = {"": [{"name": "f1", "type": "folder"}]}
+ for level in range(1, 6):
+ tree["|".join(f"f{i}" for i in range(1, level + 1))] = [{"name": f"f{level + 1}", "type": "folder"}]
+
+ batches, session = _run_get_rows(_application_list_responder(tree), "metrics", FakeResumeManager())
+ rows = [row for batch in batches for row in batch]
+
+ assert max(row["depth"] for row in rows) == METRIC_TREE_MAX_DEPTH
+ assert len(session.get_calls) == 1 + METRIC_TREE_MAX_DEPTH
+
+ def test_metric_tree_walk_stops_at_the_request_budget(self) -> None:
+ tree = {"": [{"name": "f1", "type": "folder"}, {"name": "f2", "type": "folder"}]}
+ tree["f1"] = [{"name": "leaf", "type": "leaf"}]
+ tree["f2"] = [{"name": "leaf", "type": "leaf"}]
+
+ logger = mock.MagicMock()
+ with mock.patch.object(appdynamics_module, "METRIC_TREE_MAX_REQUESTS_PER_APPLICATION", 2):
+ _, session = _run_get_rows(_application_list_responder(tree), "metrics", FakeResumeManager(), logger=logger)
+
+ assert len(session.get_calls) == 1 + 2
+ assert logger.warning.call_count == 1
+
class TestAppdynamicsSourceResponse:
@parameterized.expand(list(APPDYNAMICS_ENDPOINTS.keys()))
@@ -595,6 +800,7 @@ class TestAppdynamicsSourceResponse:
resumable_source_manager=FakeResumeManager(), # type: ignore[arg-type]
team_id=1,
metric_paths=["Overall Application Performance|*"],
+ event_types=["APPLICATION_DEPLOYMENT"],
)
config = APPDYNAMICS_ENDPOINTS[endpoint]
assert response.name == endpoint
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/tests/test_appdynamics_source.py b/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/tests/test_appdynamics_source.py
index 6426e02d6530..22d2201e3681 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/tests/test_appdynamics_source.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/appdynamics/tests/test_appdynamics_source.py
@@ -3,7 +3,9 @@ from unittest import mock
from products.warehouse_sources.backend.temporal.data_imports.sources.appdynamics.appdynamics import AppdynamicsAuth
from products.warehouse_sources.backend.temporal.data_imports.sources.appdynamics.settings import (
+ DEFAULT_EVENT_TYPES,
ENDPOINTS,
+ MAX_EVENT_TYPES,
MAX_METRIC_PATHS,
)
from products.warehouse_sources.backend.temporal.data_imports.sources.appdynamics.source import AppdynamicsSource
@@ -14,7 +16,7 @@ from products.warehouse_sources.backend.temporal.data_imports.sources.generated_
)
-def _api_client_config(metric_paths: str | None = None) -> AppdynamicsSourceConfig:
+def _api_client_config(metric_paths: str | None = None, event_types: str | None = None) -> AppdynamicsSourceConfig:
return AppdynamicsSourceConfig(
host="https://acme.saas.appdynamics.com",
account_name="acme",
@@ -22,6 +24,7 @@ def _api_client_config(metric_paths: str | None = None) -> AppdynamicsSourceConf
selection="api_client", api_client_name="client", api_client_secret="secret"
),
metric_paths=metric_paths,
+ event_types=event_types,
)
@@ -63,10 +66,16 @@ class TestAppdynamicsSource:
schemas = {s.name: s for s in self.source.get_schemas(_api_client_config(), self.team_id)}
assert set(schemas) == set(ENDPOINTS)
- incremental_endpoints = {name for name, s in schemas.items() if s.supports_incremental}
- assert incremental_endpoints == {"health_rule_violations", "metric_data"}
- for name in incremental_endpoints:
- assert {f["field"] for f in schemas[name].incremental_fields} == {"startTimeInMillis"}
+ # Each time-windowed endpoint carries its own epoch-ms start field as the cursor.
+ cursors = {
+ name: {f["field"] for f in s.incremental_fields} for name, s in schemas.items() if s.supports_incremental
+ }
+ assert cursors == {
+ "health_rule_violations": {"startTimeInMillis"},
+ "metric_data": {"startTimeInMillis"},
+ "events": {"eventTime"},
+ "request_snapshots": {"serverStartTime"},
+ }
def test_get_schemas_filtered_by_name(self) -> None:
schemas = self.source.get_schemas(_api_client_config(), self.team_id, names=["applications"])
@@ -119,6 +128,24 @@ class TestAppdynamicsSource:
assert valid is False
assert error is not None and "Too many metric paths" in error
+ def test_event_types_default_when_empty(self) -> None:
+ assert self.source._event_types_for_config(_api_client_config()) == DEFAULT_EVENT_TYPES
+
+ def test_event_types_parsed_from_textarea(self) -> None:
+ config = _api_client_config(event_types="APPLICATION_DEPLOYMENT\n\n APP_SERVER_RESTART \n")
+ assert self.source._event_types_for_config(config) == ["APPLICATION_DEPLOYMENT", "APP_SERVER_RESTART"]
+
+ def test_event_types_over_limit_rejected(self) -> None:
+ config = _api_client_config(event_types="\n".join(f"EVENT_{i}" for i in range(MAX_EVENT_TYPES + 1)))
+
+ with pytest.raises(ValueError):
+ self.source._event_types_for_config(config)
+
+ # the same cap rejects the config at source create/edit time
+ valid, error = self.source.validate_credentials(config, self.team_id)
+ assert valid is False
+ assert error is not None and "Too many event types" in error
+
@mock.patch(
"products.warehouse_sources.backend.temporal.data_imports.sources.appdynamics.source.validate_appdynamics_credentials"
)
@@ -152,6 +179,7 @@ class TestAppdynamicsSource:
assert kwargs["endpoint"] == "health_rule_violations"
assert kwargs["team_id"] == 1
assert kwargs["metric_paths"] == ["Overall Application Performance|*"]
+ assert kwargs["event_types"] == DEFAULT_EVENT_TYPES
assert kwargs["should_use_incremental_field"] is True
assert kwargs["db_incremental_field_last_value"] == 1704067200000
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/generated_configs/appdynamics.py b/products/warehouse_sources/backend/temporal/data_imports/sources/generated_configs/appdynamics.py
index 656b61098cd3..1ad78b29f761 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/generated_configs/appdynamics.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/generated_configs/appdynamics.py
@@ -21,3 +21,4 @@ class AppdynamicsSourceConfig(config.Config):
account_name: str
auth_method: AppdynamicsAuthMethodConfig
metric_paths: str | None = None
+ event_types: str | None = None