feat: emit argus-unique diagnostics over OTLP for Prometheus parity#263
Merged
Conversation
…metheus parity The code review on #262 surfaced that several argus-unique series (no OTel semconv equivalent) shipped on the Prometheus scrape but were absent from the OTLP export — an operator switching from scrape to OTLP silently lost leak detection and GC-rate diagnostics. Add the scalar argus-unique series to OtlpJsonBuilder, in parity with PrometheusMetricsCollector and with matching values: - argus_gc_pause_time_seconds_avg, argus_gc_overhead_warning - argus_gc_allocation_rate_kbps, argus_gc_promotion_rate_kbps - argus_gc_leak_suspected, argus_gc_leak_confidence - argus_heap_usage_ratio - argus_metaspace_reserved_bytes - argus_carrier_threads_virtual_handled_total These have no semconv equivalent, so they are always emitted (not gated by argus.metrics.legacyNames). A test asserts they ship even when legacyNames=false. Intentionally still Prometheus-only (documented, not a regression): the legacy argus_gc_pause_seconds_* histogram (the OTLP path uses the semconv jvm.gc.duration histogram instead), and the label-dimensioned breakdown series (argus_gc_{pause,events}_breakdown_*, argus_allocation_class_bytes, argus_profiling_method_samples, argus_contention_hotspot_events) which need per-series OTLP attribute support — a separate, larger change. Signed-off-by: rlaope <piyrw9754@gmail.com>
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.
What
Follow-up to the #262 code review. Several argus-unique series (no OTel semconv equivalent) shipped on the Prometheus scrape but were missing from the OTLP export — so an operator moving from Prometheus scrape to OTLP push silently lost leak detection and GC-rate diagnostics.
This adds the scalar argus-unique series to
OtlpJsonBuilder, in parity withPrometheusMetricsCollectorand with matching values/units:argus_gc_pause_time_seconds_avg,argus_gc_overhead_warningargus_gc_allocation_rate_kbps,argus_gc_promotion_rate_kbpsargus_gc_leak_suspected,argus_gc_leak_confidenceargus_heap_usage_ratioargus_metaspace_reserved_bytesargus_carrier_threads_virtual_handled_totalThese have no semconv equivalent, so they are always emitted (not gated by
argus.metrics.legacyNames). New testotlp_emits_argus_unique_diagnostics_regardless_of_legacy_flagasserts they ship even whenlegacyNames=false.Intentionally still Prometheus-only (documented, not a regression)
argus_gc_pause_seconds_*histogram — the OTLP path already carries the semconvjvm.gc.durationhistogram as the equivalent; duplicating the legacy histogram over OTLP would contradict thelegacyNamesdesign.argus_gc_pause_breakdown_seconds_total,argus_gc_events_breakdown_total,argus_allocation_class_bytes,argus_profiling_method_samples,argus_contention_hotspot_events. These need per-series OTLP attribute encoding (the current OTLP helpers are scalar gauges/sums); a separate, larger change.After this PR the only Prometheus↔OTLP series gap is exactly those two intentional categories.
Verification
./gradlew :argus-server:test→ BUILD SUCCESSFUL (OtlpJsonBuilderMetricsTest8/8). Commit-s, noCo-Authored-By.🤖 Generated with Claude Code