Commit 4ac4e32
committed
refactor: delegate exemplar writing to OM1 writer for consistency
Apply the same delegation pattern as histogram/summary: when
exemplarCompliance=false (default), delegate writeScrapeTimestampAndExemplar
and writeExemplar to om1Writer. When exemplarCompliance=true, apply the
OM2 spec requirement (drop exemplars without timestamps) then delegate
the actual writing to om1Writer.writeExemplar.
Extracts writeExemplar from om1Writer.writeScrapeTimestampAndExemplar so
OM2 can delegate exemplar formatting without duplicating it.1 parent c2b1c02 commit 4ac4e32
File tree
2 files changed
+26
-22
lines changed- prometheus-metrics-exposition-textformats/src/main/java/io/prometheus/metrics/expositionformats
2 files changed
+26
-22
lines changedLines changed: 13 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
260 | | - | |
| 260 | + | |
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
| 342 | + | |
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
470 | 474 | | |
471 | 475 | | |
472 | 476 | | |
473 | 477 | | |
474 | | - | |
| 478 | + | |
475 | 479 | | |
476 | 480 | | |
477 | 481 | | |
478 | | - | |
479 | | - | |
| 482 | + | |
| 483 | + | |
480 | 484 | | |
481 | 485 | | |
482 | 486 | | |
483 | | - | |
484 | | - | |
| 487 | + | |
| 488 | + | |
485 | 489 | | |
486 | 490 | | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
| 491 | + | |
491 | 492 | | |
492 | | - | |
493 | | - | |
| 493 | + | |
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
| |||
Lines changed: 13 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
427 | | - | |
| 427 | + | |
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
| 435 | + | |
443 | 436 | | |
444 | 437 | | |
445 | 438 | | |
446 | 439 | | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
447 | 451 | | |
448 | 452 | | |
449 | 453 | | |
| |||
0 commit comments