Add VENICE_EXTERNAL_STORAGE_READ_MODE dimension#2865
Open
ymuppala wants to merge 1 commit into
Open
Conversation
Add a new OTel dimension constant so client-side stats can tag metrics with the active ExternalStorageReadMode. Three orchestrator-side read-path metrics currently carry only venice.store.name; with this constant landed, those metrics can be split by mode (VENICE_ONLY, EXTERNAL_ONLY, DUAL_MODE_CONSISTENCY_CHECK, DUAL_MODE_EARLY_RETURN). Dimension key follows the existing convention: venice.external_storage.read_mode. Bundled wrapper class converts the enum to lowercase-snake-case values for emission. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR extends the client-side OpenTelemetry dimension set to support tagging metrics by the active external-storage read routing mode, enabling per-mode breakdowns for key read-path metrics.
Changes:
- Added
VENICE_EXTERNAL_STORAGE_READ_MODEtoVeniceMetricsDimensionswith keyvenice.external_storage.read_mode. - Introduced
VeniceExternalStorageReadModeenum implementingVeniceDimensionInterface, mirroringcom.linkedin.venice.meta.ExternalStorageReadMode. - Updated/added unit tests to validate the new dimension key across naming formats and the enum’s value mappings.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| internal/venice-client-common/src/main/java/com/linkedin/venice/stats/dimensions/VeniceMetricsDimensions.java | Adds the new OTel dimension constant and its canonical snake-case key. |
| internal/venice-client-common/src/main/java/com/linkedin/venice/stats/dimensions/VeniceExternalStorageReadMode.java | Defines the dimension value enum for external storage read modes. |
| internal/venice-client-common/src/test/java/com/linkedin/venice/stats/dimensions/VeniceMetricsDimensionsTest.java | Extends dimension naming-format assertions (snake/camel/pascal) for the new dimension. |
| internal/venice-client-common/src/test/java/com/linkedin/venice/stats/dimensions/VeniceExternalStorageReadModeTest.java | Adds coverage for the enum-to-string dimension value mappings and dimension-name consistency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add an OTel dimension constant so client-side stats can tag metrics with the active
ExternalStorageReadMode. Three read-path metrics on the client side currently carry onlyvenice.store.name; with this constant landed, those metrics can be split by mode (VENICE_ONLY,EXTERNAL_ONLY,DUAL_MODE_CONSISTENCY_CHECK,DUAL_MODE_EARLY_RETURN).Changes
VENICE_EXTERNAL_STORAGE_READ_MODEentry inVeniceMetricsDimensions(key:venice.external_storage.read_mode).VeniceExternalStorageReadModeenum implementingVeniceDimensionInterface(mirrorscom.linkedin.venice.meta.ExternalStorageReadMode; lowercase-snake values:venice_only,external_only,dual_mode_consistency_check,dual_mode_early_return).Testing Done
./gradlew :internal:venice-client-common:test— 673 tests pass.New
VeniceExternalStorageReadModeTestcovers all 4 mode → string mappings;VeniceMetricsDimensionsTestupdated with snake/camel/pascal validations for the new entry.