Skip to content

Add VENICE_EXTERNAL_STORAGE_READ_MODE dimension#2865

Open
ymuppala wants to merge 1 commit into
linkedin:mainfrom
ymuppala:ymuppala/add-external-storage-read-mode-dimension
Open

Add VENICE_EXTERNAL_STORAGE_READ_MODE dimension#2865
ymuppala wants to merge 1 commit into
linkedin:mainfrom
ymuppala:ymuppala/add-external-storage-read-mode-dimension

Conversation

@ymuppala

Copy link
Copy Markdown
Collaborator

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 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).

Changes

  • New VENICE_EXTERNAL_STORAGE_READ_MODE entry in VeniceMetricsDimensions (key: venice.external_storage.read_mode).
  • New VeniceExternalStorageReadMode enum implementing VeniceDimensionInterface (mirrors com.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 VeniceExternalStorageReadModeTest covers all 4 mode → string mappings; VeniceMetricsDimensionsTest updated with snake/camel/pascal validations for the new entry.

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>
Copilot AI review requested due to automatic review settings June 15, 2026 11:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_MODE to VeniceMetricsDimensions with key venice.external_storage.read_mode.
  • Introduced VeniceExternalStorageReadMode enum implementing VeniceDimensionInterface, mirroring com.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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants