You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sap_hana: address DO review feedback (cancel, query key, query_timeout)
Key the Data Observability scheduler off the monitor_id when the RC payload carries
a real (non-zero) one — the forward-looking contract shared with Postgres — and fall
back to a hash of the query text otherwise. This matters because the payload delivered
to agents today carries no per-query monitor_id (it decodes to 0/None); keying purely
off monitor_id would collapse every query onto 0. The query-text fallback is safe
because the SQL embeds the monitor id(s) it serves (in a trailing Datadog comment, or
the column alias for custom SQL), so distinct monitors always produce distinct query
text. The key upgrades to monitor_id automatically once the backend starts emitting it.
Rename the per-query timeout_seconds option to query_timeout in milliseconds to align
with the Postgres DO config and the agent RC handler, which delivers query_timeout as
timeout_seconds * 1000. Add SapHanaCheck.cancel() so the DBMAsyncJob thread pool is
released when the check is unscheduled (cluster-agent flavor / one-off runs). Apply
reviewer doc suggestions in the README and spec.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: sap_hana/README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,7 +153,7 @@ See the [sample sap_hana.d/conf.yaml][4] for all available schema collection opt
153
153
154
154
The Datadog backend can deliver monitoring queries to the SAP HANA check via Remote Configuration. When enabled, the Agent executes these queries against HANA on a schedule and forwards the results as Data Observability events.
155
155
156
-
To allow Remote Configuration to push query configs to the `sap_hana` check, add it to the allow listin`datadog.yaml`:
156
+
To allow Remote Configuration to push query configs to the `sap_hana` check, add `sap_hana` to the allowlistin`datadog.yaml`:
157
157
158
158
```yaml
159
159
remote_configuration:
@@ -162,9 +162,9 @@ remote_configuration:
162
162
- sap_hana
163
163
```
164
164
165
-
Without this entry, the Agent silently drops any query dispatched by the backend with no error surfaced. After updating `datadog.yaml`, [restart the Agent][5].
165
+
Without this entry, the Agent silently drops any query delivered by the backend without surfacing an error. After updating `datadog.yaml`, [restart the Agent][5].
166
166
167
-
Data Observability query actions require schema collection to be enabled. Ensure the `collect_schemas` block is present and `enabled: true`in your `sap_hana.d/conf.yaml` (see [Schema collection](#schema-collection)).
167
+
Data Observability query actions require schema collection to be enabled. Verify that the `collect_schemas` block is present and `enabled: true`in your `sap_hana.d/conf.yaml` (see [Schema collection](#schema-collection)).
Copy file name to clipboardExpand all lines: sap_hana/datadog_checks/sap_hana/config_models/instance.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -84,13 +84,13 @@ class Query(BaseModel):
84
84
)
85
85
monitor_id: Optional[int] =None
86
86
query: str
87
-
schedule: Optional[str] =Field(
87
+
query_timeout: Optional[int] =Field(
88
88
None,
89
-
description='A standard 5-field cron expression (minute hour dom month dow) specifying\nwhen to run this query. When both schedule and interval_seconds are set,\nschedule wins and interval_seconds is ignored. If neither is set, the\nquery is skipped at runtime with a warning.\n',
89
+
description='Statement timeout for this query in milliseconds. Applied as a connection-level\nstatementTimeout when executing the query.\n',
90
90
)
91
-
timeout_seconds: Optional[int] =Field(
91
+
schedule: Optional[str] =Field(
92
92
None,
93
-
description='Statement timeout for this query in seconds. Applied as a connection-level\nstatementTimeout when executing the query.\n',
93
+
description='A standard 5-field cron expression (minute hour dom month dow) specifying\nwhen to run this query. When both schedule and interval_seconds are set,\nschedule wins and interval_seconds is ignored. If neither is set, the\nquery is skipped at runtime with a warning.\n',
0 commit comments