Commit a470127
authored
Dev/skruk/imp event log (#64)
* fix: Correct span timestamp tracking to prevent re-processing after agent restart
- Track actual last row timestamp in `_process_span_rows()` instead of using `current_timestamp()` column expression
- Remove unused `current_timestamp` import from snowflake.snowpark.functions
- Add `lookback_hours` configuration parameter to event_log plugin (default: 24)
- Update all three event_log SQL views to use configurable lookback window
- Expand event_log configuration documentation with cost optimization guidance
* feat: Add support for SNOWFLAKE.TELEMETRY.EVENTS as account-level event table
- Remove 'snowflake.telemetry.events' from excluded event tables array in SETUP_EVENT_TABLE()
- Wrap GRANT SELECT statement in exception handler to silently ignore failures on read-only or Snowflake-managed tables
- Create DTAGENT_DB.STATUS.EVENT_LOG as view over snowflake.telemetry.events when configured
- Update CHANGELOG and DEVLOG with BDX-1172 fix details and behavior explanation
* feat: Add configurable lookback_hours parameter to all plugins with incremental views
- Add `lookback_hours` configuration parameter to data_schemas (4h), event_usage (6h), login_history (24h), tasks (4h), and warehouse_usage (24h) plugins
- Replace hardcoded lookback values in SQL views with `F_GET_CONFIG_VALUE('plugins.<plugin>.lookback_hours', <default>)` calls
- Unify tasks plugin to use single `lookback_hours` parameter for both serverless_tasks and task_versions views (previously 4h and 1
* refactor: Split tasks plugin lookback configuration into separate keys for serverless and version views
- Add `lookback_hours_versions` parameter (default: 720h = 1 month) to tasks plugin configuration
- Update `063_v_task_versions.sql` to use `plugins.tasks.lookback_hours_versions` instead of shared `lookback_hours`
- Preserve original defaults: `lookback_hours` remains 4h for serverless tasks, `lookback_hours_versions` uses 720h for task versions
- Update documentation to clarify separate look
* chore: Update markdown linting to use markdownlint-cli2 and adjust configuration tables for consistency
* feat: Update documentation and configuration for plugins
- Enhanced the `INSTALL.md` and `PLUGINS.md` files to clarify the `lookback_hours` parameter and its behavior across various plugins.
- Added detailed configuration options for the `data_schemas`, `event_log`, `event_usage`, `login_history`, `tasks`, and `warehouse_usage` plugins, ensuring consistency in descriptions and default values.
- Updated the SQL initialization script for the event log to improve clarity on table handling.
- Adjusted the `event_log-config.yml` to modify default values for `lookback_hours` and `retention_hours`.
* default lookback was 24h - adjusting to avoid product change
* feat: Update event log plugin to log warnings on grant failures and adjust lookback and retention hours in configuration1 parent 3757d85 commit a470127
File tree
34 files changed
+246
-47
lines changed- .github
- docs
- src/dtagent/plugins
- data_schemas.config
- data_schemas.sql
- event_log.config
- event_log.sql
- init
- event_usage.config
- event_usage.sql
- login_history.config
- login_history.sql
- tasks.config
- tasks.sql
- warehouse_usage.config
- warehouse_usage.sql
34 files changed
+246
-47
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| 151 | + | |
| 152 | + | |
151 | 153 | | |
152 | 154 | | |
153 | 155 | | |
| |||
159 | 161 | | |
160 | 162 | | |
161 | 163 | | |
162 | | - | |
| 164 | + | |
| 165 | + | |
163 | 166 | | |
164 | 167 | | |
165 | 168 | | |
| |||
226 | 229 | | |
227 | 230 | | |
228 | 231 | | |
229 | | - | |
| 232 | + | |
230 | 233 | | |
231 | 234 | | |
232 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
38 | 47 | | |
39 | 48 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
44 | 63 | | |
45 | 64 | | |
46 | 65 | | |
| |||
163 | 182 | | |
164 | 183 | | |
165 | 184 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
172 | 204 | | |
173 | 205 | | |
174 | 206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
779 | 779 | | |
780 | 780 | | |
781 | 781 | | |
782 | | - | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
783 | 793 | | |
784 | 794 | | |
785 | 795 | | |
| |||
0 commit comments