Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ public interface ElasticConfig extends StepRegistryConfig {
* @param key Key to look up in the config.
* @return Value for the key or null if no key is present.
*/
@Override
@Nullable
String get(String key);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to remove these, but I couldn't due to binary compatibility check failures.

I created #6145 instead.


/**
* Property prefix to prepend to configuration names.
* @return property prefix
*/
@Override
default String prefix() {
return "elastic";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@ public interface GangliaConfig extends StepRegistryConfig {
* @param key Key to lookup in the config.
* @return Value for the key or null if no key is present.
*/
@Override
@Nullable
String get(String key);

/**
* @return Property prefix to prepend to configuration names.
*/
@Override
default String prefix() {
return "ganglia";
}
Expand Down Expand Up @@ -98,6 +100,7 @@ default int port() {
/**
* @return {@code true} if publishing is enabled. Default is {@code true}.
*/
@Override
default boolean enabled() {
return getBoolean(this, "enabled").orElse(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ public interface GraphiteConfig extends DropwizardConfig {
* @param key Key to lookup in the config.
* @return Value for the key or null if no key is present.
*/
@Override
@Nullable
String get(String key);

/**
* @return Property prefix to prepend to configuration names.
*/
@Override
default String prefix() {
return "graphite";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ static class Instant extends NumericQuery {
this.toValue = toValue;
}

@Override
protected Double getValue(MeterRegistry registry) {
return toValue.apply(search.apply(Search.in(registry)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public interface KairosConfig extends StepRegistryConfig {
* Property prefix to prepend to configuration names.
* @return property prefix
*/
@Override
default String prefix() {
return "kairos";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public interface OpenTSDBConfig extends PushRegistryConfig {
* Property prefix to prepend to configuration names.
* @return property prefix
*/
@Override
default String prefix() {
return "opentsdb";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ void gauge() {
+ " time_unix_nano: 1000000\n" + " as_double: \\d+\\.0\n" + " }\n" + "}\n");
}

@Override
@Test
void timeGauge() {
TimeGauge timeGauge = TimeGauge.builder("gauge.time", this, TimeUnit.MICROSECONDS, o -> 24).register(registry);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ void gauge() {
.isEqualTo(otlpConfig().step().plus(Duration.ofMillis(1)).toNanos());
}

@Override
@Test
void timeGauge() {
TimeGauge timeGauge = TimeGauge.builder("gauge.time", this, TimeUnit.MICROSECONDS, o -> 24).register(registry);
Expand Down Expand Up @@ -356,6 +357,7 @@ void longTaskTimer() {
UNIT_MILLISECONDS, 0, 0, 0);
}

@Override
@Test
void testMetricsStartAndEndTime() {
Counter counter = Counter.builder("test_publish_time").register(registry);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ T firstChild() {
}
}

@Override
public final void add(MeterRegistry registry) {
final T newMeter = registerNewMeter(registry);
if (newMeter == null) {
Expand All @@ -90,6 +91,7 @@ public final void add(MeterRegistry registry) {
* each meter belonging to the composite.
* @param registry The registry to remove.
*/
@Override
@Deprecated
public final void remove(MeterRegistry registry) {
for (;;) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ public CumulativeFunctionTimer(Id id, T obj, ToLongFunction<T> countFunction, To
/**
* The total number of occurrences of the timed event.
*/
@Override
public double count() {
T obj2 = ref.get();
return obj2 != null ? (lastCount = Math.max(countFunction.applyAsLong(obj2), 0)) : lastCount;
Expand All @@ -67,6 +68,7 @@ public double count() {
/**
* The total time of all occurrences of the timed event.
*/
@Override
public double totalTime(TimeUnit unit) {
T obj2 = ref.get();
if (obj2 != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ private ValueAtPercentile[] takeValueSnapshot() {
return values;
}

@Override
public void recordLong(long value) {
rotate();
try {
Expand All @@ -181,6 +182,7 @@ public void recordLong(long value) {
}
}

@Override
public void recordDouble(double value) {
rotate();
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public StepFunctionTimer(Id id, Clock clock, long stepMillis, T obj, ToLongFunct
/**
* The total number of occurrences of the timed event.
*/
@Override
public double count() {
accumulateCountAndTotal();
return countTotal.poll1();
Expand All @@ -83,6 +84,7 @@ public double count() {
/**
* The total time of all occurrences of the timed event.
*/
@Override
public double totalTime(TimeUnit unit) {
accumulateCountAndTotal();
return TimeUtils.convert(countTotal.poll2(), baseTimeUnit(), unit);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class GuavaCacheMetricsTest extends AbstractCacheMetricsTest {

// tag::setup[]
LoadingCache<String, String> cache = CacheBuilder.newBuilder().recordStats().build(new CacheLoader<>() {
@Override
public String load(String key) {
return "";
}
Expand Down Expand Up @@ -114,6 +115,7 @@ void returnHitCount() throws ExecutionException {
@Test
void returnHitCountWithoutRecordStats() throws ExecutionException {
LoadingCache<String, String> cache = CacheBuilder.newBuilder().build(new CacheLoader<>() {
@Override
public String load(String key) {
return "";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,7 @@ public void setContextualName(@Nullable String contextualName) {
* Returns the parent {@link ObservationView}.
* @return parent observation or {@code null} if there was no parent
*/
@Override
@Nullable
public ObservationView getParentObservation() {
return parentObservation;
Expand Down