Commit 15c3e7a
[kafka_consumer] Send cluster monitoring heartbeat via data streams messages (DataDog#23281)
* [kafka_consumer] Send heartbeat via data streams messages when cluster monitoring is enabled
Report context count and limit on every check run so we can tell if a customer is hitting the context ceiling.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Add changelog entry for cluster monitoring heartbeat
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Fall back to admin client metadata for cluster_id in heartbeat
When highwater offset collection is skipped (context limit exceeded),
cluster_id is empty. Use the cluster metadata from request_metadata_update()
which runs unconditionally.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Derive cluster_id internally in heartbeat method
Always read cluster_id from admin client metadata instead of accepting
it as a parameter. Simpler and removes dependency on caller state.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Use getattr for _cluster_metadata access to handle mocked clients
Tests mock self.client without _cluster_metadata attribute, causing
AttributeError. Use getattr with a default to be safe.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Accept cluster_id from caller, use _auto_detected_cluster_id for original
The check() method already resolves cluster_id (with override) and stores
the auto-detected value in config._auto_detected_cluster_id. Reuse that
rather than trying to read _cluster_metadata directly, which breaks with
mocked clients in tests.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 7cd9465 commit 15c3e7a
2 files changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
133 | 134 | | |
134 | 135 | | |
135 | 136 | | |
| |||
141 | 142 | | |
142 | 143 | | |
143 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
144 | 157 | | |
145 | 158 | | |
146 | 159 | | |
| |||
0 commit comments