Commit 4d1cca9
committed
[da-vinci][client-common][test] Add per-metric attribution + per-replica-type
ingestion gauges
OTel ingestion gauges:
- New entities: ingestion.task.count, ingestion.key.active_count,
ingestion.key.unique_ingested_count, dimensioned by version-role and
(where applicable) replica-type. Wired through multi-emit gauges via
createAsyncByRole / createAsyncByRoleAndReplicaType helpers.
- IngestionOtelStats.resolveByRole consolidates version-role lookup;
setIngestionTaskPushTimeoutGauge / recordIdleTime gate writes on task
registration via computeIfPresent.
- HostLevelIngestionStats uses the new no-arg aggregators on
StoreIngestionTask to avoid duplicating partition iteration.
StoreIngestionTask aggregation:
- getActiveKeyCount(ReplicaType) and getEstimatedUniqueIngestedKeyCount
(ReplicaType) backed by getKeyCountByReplicaType + matchesReplicaType
(LEADER<->LEADER, FOLLOWER<->STANDBY; transitional states excluded from
per-replica aggregates).
- Consolidated active-key-count invalidation into a
recordActiveKeyCountInvalidation helper.
recordFailureMetric per-metric attribution:
- New VENICE_METRIC_NAME dimension. recordFailureMetric switched to
MetricEntityStateGeneric and tags every failure with venice.metric.name.
- New MetricEntity.createWithCustomPrefix factory (dimensions + custom
prefix); prefix validation centralized in a private helper. Removed
unused 5-arg createWithNoDimensions overload.
- Defensive re-entry guard in incrementFailureCounter to short-circuit
recursion if recording the failure metric itself ever throws.
- Extracted INTERNAL_METRIC_PREFIX constant.
Tests:
- New StoreIngestionTaskAggregationTest covers per-replica-type aggregators
(LEADER-only, FOLLOWER-only, IN_TRANSITION/PAUSE_TRANSITION exclusion,
untracked, no-arg total, LEADER+FOLLOWER<total invariant).
- VeniceOpenTelemetryMetricsRepositoryTest: per-metric attribution,
accumulation, null-message exception tolerance, both Exception/String
overloads accumulating into the same data point.
- MetricEntityTest: createWithCustomPrefix happy path + validation
branches (empty prefix, "venice." prefix, empty dimensions, RATIO +
long-only metric type rejection).
- VeniceMetricsDimensionsTest: VENICE_METRIC_NAME in snake_case, camelCase,
and PascalCase switches.1 parent 18dae4a commit 4d1cca9
27 files changed
Lines changed: 1158 additions & 491 deletions
File tree
- clients/da-vinci-client/src
- main/java/com/linkedin/davinci
- kafka/consumer
- stats
- ingestion
- test/java/com/linkedin/davinci
- kafka/consumer
- stats
- ingestion
- internal/venice-client-common/src
- main/java/com/linkedin/venice/stats
- dimensions
- metrics
- test/java/com/linkedin/venice/stats
- dimensions
- metrics
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
939 | 939 | | |
940 | 940 | | |
941 | 941 | | |
942 | | - | |
943 | | - | |
| 942 | + | |
944 | 943 | | |
945 | 944 | | |
946 | 945 | | |
| |||
1056 | 1055 | | |
1057 | 1056 | | |
1058 | 1057 | | |
1059 | | - | |
1060 | | - | |
| 1058 | + | |
1061 | 1059 | | |
1062 | 1060 | | |
1063 | 1061 | | |
| |||
Lines changed: 79 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
| 190 | + | |
189 | 191 | | |
190 | 192 | | |
| 193 | + | |
191 | 194 | | |
192 | 195 | | |
193 | 196 | | |
| |||
4696 | 4699 | | |
4697 | 4700 | | |
4698 | 4701 | | |
4699 | | - | |
4700 | | - | |
| 4702 | + | |
| 4703 | + | |
4701 | 4704 | | |
4702 | 4705 | | |
4703 | 4706 | | |
| |||
4706 | 4709 | | |
4707 | 4710 | | |
4708 | 4711 | | |
4709 | | - | |
4710 | | - | |
| 4712 | + | |
4711 | 4713 | | |
4712 | 4714 | | |
4713 | 4715 | | |
| |||
4735 | 4737 | | |
4736 | 4738 | | |
4737 | 4739 | | |
| 4740 | + | |
| 4741 | + | |
| 4742 | + | |
| 4743 | + | |
| 4744 | + | |
4738 | 4745 | | |
4739 | 4746 | | |
4740 | 4747 | | |
| |||
5784 | 5791 | | |
5785 | 5792 | | |
5786 | 5793 | | |
5787 | | - | |
5788 | | - | |
5789 | | - | |
| 5794 | + | |
| 5795 | + | |
| 5796 | + | |
| 5797 | + | |
| 5798 | + | |
| 5799 | + | |
| 5800 | + | |
| 5801 | + | |
| 5802 | + | |
| 5803 | + | |
| 5804 | + | |
| 5805 | + | |
| 5806 | + | |
| 5807 | + | |
| 5808 | + | |
| 5809 | + | |
| 5810 | + | |
| 5811 | + | |
| 5812 | + | |
| 5813 | + | |
| 5814 | + | |
| 5815 | + | |
| 5816 | + | |
| 5817 | + | |
| 5818 | + | |
| 5819 | + | |
| 5820 | + | |
| 5821 | + | |
| 5822 | + | |
| 5823 | + | |
| 5824 | + | |
| 5825 | + | |
| 5826 | + | |
| 5827 | + | |
| 5828 | + | |
| 5829 | + | |
| 5830 | + | |
| 5831 | + | |
5790 | 5832 | | |
5791 | | - | |
| 5833 | + | |
| 5834 | + | |
| 5835 | + | |
| 5836 | + | |
| 5837 | + | |
5792 | 5838 | | |
5793 | | - | |
5794 | | - | |
5795 | | - | |
| 5839 | + | |
| 5840 | + | |
| 5841 | + | |
| 5842 | + | |
5796 | 5843 | | |
| 5844 | + | |
| 5845 | + | |
| 5846 | + | |
| 5847 | + | |
| 5848 | + | |
| 5849 | + | |
| 5850 | + | |
| 5851 | + | |
| 5852 | + | |
| 5853 | + | |
| 5854 | + | |
| 5855 | + | |
| 5856 | + | |
| 5857 | + | |
| 5858 | + | |
| 5859 | + | |
| 5860 | + | |
| 5861 | + | |
| 5862 | + | |
| 5863 | + | |
| 5864 | + | |
5797 | 5865 | | |
5798 | | - | |
5799 | 5866 | | |
5800 | 5867 | | |
5801 | 5868 | | |
| |||
Lines changed: 6 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
310 | 311 | | |
311 | 312 | | |
312 | 313 | | |
313 | | - | |
| 314 | + | |
314 | 315 | | |
315 | 316 | | |
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
319 | 320 | | |
320 | | - | |
321 | | - | |
| 321 | + | |
| 322 | + | |
322 | 323 | | |
323 | 324 | | |
324 | 325 | | |
325 | 326 | | |
326 | | - | |
| 327 | + | |
327 | 328 | | |
328 | 329 | | |
329 | 330 | | |
330 | 331 | | |
331 | | - | |
| 332 | + | |
332 | 333 | | |
333 | 334 | | |
334 | 335 | | |
| |||
582 | 583 | | |
583 | 584 | | |
584 | 585 | | |
585 | | - | |
586 | | - | |
587 | | - | |
588 | | - | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | 586 | | |
599 | 587 | | |
600 | 588 | | |
| |||
Lines changed: 26 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
323 | 324 | | |
324 | 325 | | |
325 | 326 | | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
326 | 335 | | |
327 | 336 | | |
328 | | - | |
| 337 | + | |
| 338 | + | |
329 | 339 | | |
330 | 340 | | |
331 | 341 | | |
332 | 342 | | |
333 | 343 | | |
334 | | - | |
| 344 | + | |
335 | 345 | | |
336 | 346 | | |
337 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
338 | 359 | | |
339 | 360 | | |
340 | | - | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
341 | 364 | | |
342 | 365 | | |
343 | 366 | | |
| |||
0 commit comments