Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
merge: Update Micrometer stack
Carry active meter removal handling forward and use the shared removal lifecycle for function counters.

Co-Authored-By: Claude <noreply@anthropic.com>
  • Loading branch information
adinauer and claude committed Sep 18, 2026
commit 54b12afdc0c71ba152161c81aebd5aa144a3f6d1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import java.util.function.ToDoubleFunction;
import org.jetbrains.annotations.NotNull;

final class SentryFunctionCounter<T> extends CumulativeFunctionCounter<T> {
final class SentryFunctionCounter<T> extends CumulativeFunctionCounter<T>
implements SentryRemovableMeter {
private final @NotNull SentryMeterRegistry registry;
private final @NotNull SentryMetricInfo metricInfo;
private volatile boolean removed;
Expand Down Expand Up @@ -42,7 +43,8 @@ void poll() {
}
}

void markRemoved() {
@Override
public void markRemoved() {
removed = true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ private void publishLongTaskTimer(final @NotNull LongTaskTimer timer) {
}

private void onMeterRemoved(final @NotNull Meter meter) {
if (meter instanceof SentryFunctionCounter) {
((SentryFunctionCounter<?>) meter).markRemoved();
if (meter instanceof SentryRemovableMeter) {
((SentryRemovableMeter) meter).markRemoved();
}
}

Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.