-
Notifications
You must be signed in to change notification settings - Fork 924
Stabilize synchronous gauge #6419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,4 +65,17 @@ public interface DoubleGaugeBuilder { | |
| default ObservableDoubleMeasurement buildObserver() { | ||
| return DefaultMeter.getInstance().gaugeBuilder("noop").buildObserver(); | ||
| } | ||
|
|
||
| /** | ||
| * Builds and returns a DoubleGauge instrument with the configuration. | ||
| * | ||
| * <p>NOTE: This produces a synchronous gauge which records gauge values as they occur. Most users | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe something about how only the most recent one is exported, since I think that part of synchronous gauges is most likely to trip people up?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll add a comment to that effect. |
||
| * will want to instead register an {@link #buildWithCallback(Consumer)} to asynchronously observe | ||
| * the value of the gauge when metrics are collected. | ||
| * | ||
| * @return The DoubleGauge instrument. | ||
| */ | ||
| default DoubleGauge build() { | ||
| return DefaultMeter.getInstance().gaugeBuilder("noop").build(); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,19 @@ | ||
| Comparing source compatibility of against | ||
| No changes. | ||
| +++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.api.metrics.DoubleGauge (not serializable) | ||
| +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. | ||
| +++ NEW SUPERCLASS: java.lang.Object | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) void set(double) | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) void set(double, io.opentelemetry.api.common.Attributes) | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) void set(double, io.opentelemetry.api.common.Attributes, io.opentelemetry.context.Context) | ||
| *** MODIFIED INTERFACE: PUBLIC ABSTRACT io.opentelemetry.api.metrics.DoubleGaugeBuilder (not serializable) | ||
| === CLASS FILE FORMAT VERSION: 52.0 <- 52.0 | ||
| +++ NEW METHOD: PUBLIC(+) io.opentelemetry.api.metrics.DoubleGauge build() | ||
| +++ NEW INTERFACE: PUBLIC(+) ABSTRACT(+) io.opentelemetry.api.metrics.LongGauge (not serializable) | ||
| +++ CLASS FILE FORMAT VERSION: 52.0 <- n.a. | ||
| +++ NEW SUPERCLASS: java.lang.Object | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) void set(long) | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) void set(long, io.opentelemetry.api.common.Attributes) | ||
| +++ NEW METHOD: PUBLIC(+) ABSTRACT(+) void set(long, io.opentelemetry.api.common.Attributes, io.opentelemetry.context.Context) | ||
| *** MODIFIED INTERFACE: PUBLIC ABSTRACT io.opentelemetry.api.metrics.LongGaugeBuilder (not serializable) | ||
| === CLASS FILE FORMAT VERSION: 52.0 <- 52.0 | ||
| +++ NEW METHOD: PUBLIC(+) io.opentelemetry.api.metrics.LongGauge build() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,4 +17,5 @@ public enum InstrumentType { | |
| OBSERVABLE_COUNTER, | ||
| OBSERVABLE_UP_DOWN_COUNTER, | ||
| OBSERVABLE_GAUGE, | ||
| GAUGE, | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.