Commit da378c3
authored
chore: improves FDv2 DataSource logging (#156)
**Requirements**
- [x] I have added test coverage for new or changed functionality
- [x] I have followed the repository's [pull request submission
guidelines](../blob/main/CONTRIBUTING.md#submitting-pull-requests)
- [ ] I have validated my changes against all supported platform
versions
Updates implementation to meet orchestration logging spec to be more
consistent with other implementations.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Low risk: changes are primarily log-level/message adjustments plus
optional `name()` methods with defaults; core data acquisition behavior
is unchanged aside from additional status dedupe state.
>
> **Overview**
> **Orchestration logging is standardized and made more actionable for
FDv2 initializers/synchronizers.** `Initializer` and `Synchronizer` now
expose a default `name()` for diagnostics, with key implementations
(polling/streaming/file/testdata and the FDv1 adapter) overriding it for
consistent labels.
>
> `FDv2DataSource` now logs initializer/synchronizer start, success,
fallback/recovery transitions, permanent failures, and exhaustion of
synchronizers with clearer severity and error detail (including
root-cause summaries). It also deduplicates repeated synchronizer status
logs until a data update occurs.
>
> Adds targeted tests validating the new orchestration log messages and
introduces small test helpers/mocks to supply custom source names.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
d5b5f04. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
BEGIN_COMMIT_OVERRIDE
chore: improves FDv2 DataSource logging
END_COMMIT_OVERRIDE1 parent f4719ec commit da378c3
11 files changed
Lines changed: 399 additions & 16 deletions
File tree
- lib/sdk/server/src
- main/java/com/launchdarkly/sdk/server
- datasources
- integrations
- test/java/com/launchdarkly/sdk/server
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
| |||
Lines changed: 93 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
| |||
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
51 | 60 | | |
52 | 61 | | |
53 | 62 | | |
| |||
73 | 82 | | |
74 | 83 | | |
75 | 84 | | |
76 | | - | |
77 | 85 | | |
78 | 86 | | |
79 | 87 | | |
| |||
117 | 125 | | |
118 | 126 | | |
119 | 127 | | |
120 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
121 | 131 | | |
122 | 132 | | |
123 | 133 | | |
| |||
157 | 167 | | |
158 | 168 | | |
159 | 169 | | |
160 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
161 | 173 | | |
162 | | - | |
| 174 | + | |
163 | 175 | | |
164 | 176 | | |
165 | 177 | | |
166 | 178 | | |
| 179 | + | |
167 | 180 | | |
168 | 181 | | |
169 | 182 | | |
| |||
176 | 189 | | |
177 | 190 | | |
178 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
179 | 195 | | |
180 | 196 | | |
181 | 197 | | |
| |||
194 | 210 | | |
195 | 211 | | |
196 | 212 | | |
197 | | - | |
198 | | - | |
199 | 213 | | |
200 | 214 | | |
201 | 215 | | |
| |||
204 | 218 | | |
205 | 219 | | |
206 | 220 | | |
207 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
208 | 225 | | |
209 | | - | |
| 226 | + | |
210 | 227 | | |
211 | 228 | | |
212 | 229 | | |
| |||
249 | 266 | | |
250 | 267 | | |
251 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
252 | 272 | | |
253 | 273 | | |
254 | 274 | | |
| |||
264 | 284 | | |
265 | 285 | | |
266 | 286 | | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
271 | 291 | | |
272 | 292 | | |
273 | 293 | | |
274 | 294 | | |
275 | 295 | | |
276 | | - | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
277 | 300 | | |
278 | 301 | | |
279 | 302 | | |
| |||
292 | 315 | | |
293 | 316 | | |
294 | 317 | | |
| 318 | + | |
| 319 | + | |
295 | 320 | | |
296 | 321 | | |
297 | 322 | | |
| |||
302 | 327 | | |
303 | 328 | | |
304 | 329 | | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
305 | 334 | | |
306 | 335 | | |
307 | 336 | | |
308 | 337 | | |
309 | 338 | | |
310 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
311 | 344 | | |
312 | 345 | | |
313 | 346 | | |
314 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
315 | 352 | | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
316 | 357 | | |
317 | 358 | | |
318 | 359 | | |
| |||
335 | 376 | | |
336 | 377 | | |
337 | 378 | | |
| 379 | + | |
338 | 380 | | |
339 | 381 | | |
340 | 382 | | |
| |||
348 | 390 | | |
349 | 391 | | |
350 | 392 | | |
351 | | - | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
352 | 397 | | |
353 | 398 | | |
354 | 399 | | |
355 | 400 | | |
356 | 401 | | |
357 | | - | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
358 | 406 | | |
359 | 407 | | |
360 | | - | |
| 408 | + | |
361 | 409 | | |
362 | 410 | | |
363 | 411 | | |
364 | 412 | | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
365 | 442 | | |
366 | 443 | | |
367 | 444 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
19 | 24 | | |
20 | 25 | | |
21 | 26 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
39 | 44 | | |
40 | 45 | | |
41 | 46 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
97 | 102 | | |
98 | 103 | | |
99 | 104 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
54 | 66 | | |
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
60 | 72 | | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
36 | 41 | | |
37 | 42 | | |
38 | 43 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
64 | 69 | | |
65 | 70 | | |
66 | 71 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
298 | 303 | | |
299 | 304 | | |
300 | 305 | | |
| |||
0 commit comments