[all] make otel sync gauge emit last recorded metrics in every export interval#2127
Merged
Merged
Conversation
kvargha
approved these changes
Sep 12, 2025
arjun4084346
pushed a commit
to arjun4084346/venice
that referenced
this pull request
Dec 9, 2025
…rt interval (linkedin#2127) Make GAUGE to be CUMULATIVE based on the `otel.venice.export.last.recorded.value.for.synchronous.gauge` config which is enabled by default to make sure the last recorded data in a synchronous gauge is always exported regardless of whether it was recorded in that interval or not.
sushantmane
pushed a commit
to sushantmane/venice
that referenced
this pull request
Jan 30, 2026
…rt interval (linkedin#2127) Make GAUGE to be CUMULATIVE based on the `otel.venice.export.last.recorded.value.for.synchronous.gauge` config which is enabled by default to make sure the last recorded data in a synchronous gauge is always exported regardless of whether it was recorded in that interval or not.
misyel
pushed a commit
to misyel/venice
that referenced
this pull request
Feb 2, 2026
…rt interval (linkedin#2127) Make GAUGE to be CUMULATIVE based on the `otel.venice.export.last.recorded.value.for.synchronous.gauge` config which is enabled by default to make sure the last recorded data in a synchronous gauge is always exported regardless of whether it was recorded in that interval or not.
sushantmane
pushed a commit
to sushantmane/venice
that referenced
this pull request
Feb 8, 2026
…rt interval (linkedin#2127) Make GAUGE to be CUMULATIVE based on the `otel.venice.export.last.recorded.value.for.synchronous.gauge` config which is enabled by default to make sure the last recorded data in a synchronous gauge is always exported regardless of whether it was recorded in that interval or not.
misyel
pushed a commit
to misyel/venice
that referenced
this pull request
Feb 17, 2026
…rt interval (linkedin#2127) Make GAUGE to be CUMULATIVE based on the `otel.venice.export.last.recorded.value.for.synchronous.gauge` config which is enabled by default to make sure the last recorded data in a synchronous gauge is always exported regardless of whether it was recorded in that interval or not.
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.
Problem Statement
In
AggregationTemporalitySelector#deltaPreferred():GAUGEfalls back to default i,eDELTA, which results in no data getting exported if a synchronousGAUGEinstrument is not recorded in that export interval, resulting in patches of data only whenever the metric is recorded.Solution
Raised an issue with OSS OTel open-telemetry/opentelemetry-java#7634 and it was concluded that its intentionally kept that way by design as an instrument should not emit old recorded data unless its recorded in that export interval.
This PR makes
GAUGEto beCUMULATIVEbased on the below config which is enabled by default.otel.venice.export.last.recorded.value.for.synchronous.gaugeCode changes
Concurrency-Specific Checks
Both reviewer and PR author to verify
synchronized,RWLock) are used where needed.ConcurrentHashMap,CopyOnWriteArrayList).How was this PR tested?
Does this PR introduce any user-facing or breaking changes?
Otel Sync Gauge metrics will always export the last recorded value unless this config is disabled.