Skip to content

Commit 3cf2f88

Browse files
committed
remove -> finish
1 parent 41fcb39 commit 3cf2f88

29 files changed

+86
-91
lines changed

api/all/src/main/java/io/opentelemetry/api/metrics/DoubleCounter.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,21 @@ public interface DoubleCounter {
4747
void add(double value, Attributes attributes, Context context);
4848

4949
/**
50-
* Remove the instrument.
50+
* Finish the instrument record.
5151
*
5252
* @param attributes A set of attributes to identify the instrument.
5353
* @since 1.56.0
5454
*/
55-
default void remove(Attributes attributes) {
56-
remove(attributes, Context.current());
55+
default void finish(Attributes attributes) {
56+
finish(attributes, Context.current());
5757
}
5858

5959
/**
60-
* Remove the instrument.
60+
* Finish the instrument record.
6161
*
6262
* @param attributes A set of attributes to identify the instrument.
6363
* @param context The explicit context to associate with this measurement.
6464
* @since 1.56.0
6565
*/
66-
default void remove(Attributes attributes, Context context) {}
66+
default void finish(Attributes attributes, Context context) {}
6767
}

api/all/src/main/java/io/opentelemetry/api/metrics/DoubleGauge.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,21 @@ public interface DoubleGauge {
4141
void set(double value, Attributes attributes, Context context);
4242

4343
/**
44-
* Remove the instrument.
44+
* Finish the instrument record.
4545
*
4646
* @param attributes A set of attributes to identify the instrument.
4747
* @since 1.56.0
4848
*/
49-
default void remove(Attributes attributes) {
50-
remove(attributes, Context.current());
49+
default void finish(Attributes attributes) {
50+
finish(attributes, Context.current());
5151
}
5252

5353
/**
54-
* Remove the instrument.
54+
* Finish the instrument record.
5555
*
5656
* @param attributes A set of attributes to identify the instrument.
5757
* @param context The explicit context to associate with this measurement.
5858
* @since 1.56.0
5959
*/
60-
default void remove(Attributes attributes, Context context) {}
60+
default void finish(Attributes attributes, Context context) {}
6161
}

api/all/src/main/java/io/opentelemetry/api/metrics/DoubleHistogram.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,21 @@ public interface DoubleHistogram {
4848
void record(double value, Attributes attributes, Context context);
4949

5050
/**
51-
* Remove the instrument.
51+
* Finish the instrument record.
5252
*
5353
* @param attributes A set of attributes to identify the instrument.
5454
* @since 1.56.0
5555
*/
56-
default void remove(Attributes attributes) {
57-
remove(attributes, Context.current());
56+
default void finish(Attributes attributes) {
57+
finish(attributes, Context.current());
5858
}
5959

6060
/**
61-
* Remove the instrument.
61+
* Finish the instrument record.
6262
*
6363
* @param attributes A set of attributes to identify the instrument.
6464
* @param context The explicit context to associate with this measurement.
6565
* @since 1.56.0
6666
*/
67-
default void remove(Attributes attributes, Context context) {}
67+
default void finish(Attributes attributes, Context context) {}
6868
}

api/all/src/main/java/io/opentelemetry/api/metrics/DoubleUpDownCounter.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,21 @@ public interface DoubleUpDownCounter {
4747
void add(double value, Attributes attributes, Context context);
4848

4949
/**
50-
* Remove the instrument.
50+
* Finish the instrument record.
5151
*
5252
* @param attributes A set of attributes to identify the instrument.
5353
* @since 1.56.0
5454
*/
55-
default void remove(Attributes attributes) {
56-
remove(attributes, Context.current());
55+
default void finish(Attributes attributes) {
56+
finish(attributes, Context.current());
5757
}
5858

5959
/**
60-
* Remove the instrument.
60+
* Finish the instrument record.
6161
*
6262
* @param attributes A set of attributes to identify the instrument.
6363
* @param context The explicit context to associate with this measurement.
6464
* @since 1.56.0
6565
*/
66-
default void remove(Attributes attributes, Context context) {}
66+
default void finish(Attributes attributes, Context context) {}
6767
}

api/all/src/main/java/io/opentelemetry/api/metrics/LongCounter.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,21 @@ public interface LongCounter {
4848
void add(long value, Attributes attributes, Context context);
4949

5050
/**
51-
* Remove the instrument.
51+
* Finish the instrument record.
5252
*
5353
* @param attributes A set of attributes to identify the instrument.
5454
* @since 1.56.0
5555
*/
56-
default void remove(Attributes attributes) {
57-
remove(attributes, Context.current());
56+
default void finish(Attributes attributes) {
57+
finish(attributes, Context.current());
5858
}
5959

6060
/**
61-
* Remove the instrument.
61+
* Finish the instrument record.
6262
*
6363
* @param attributes A set of attributes to identify the instrument.
6464
* @param context The explicit context to associate with this measurement.
6565
* @since 1.56.0
6666
*/
67-
default void remove(Attributes attributes, Context context) {}
67+
default void finish(Attributes attributes, Context context) {}
6868
}

api/all/src/main/java/io/opentelemetry/api/metrics/LongGauge.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,21 @@ public interface LongGauge {
4141
void set(long value, Attributes attributes, Context context);
4242

4343
/**
44-
* Remove the instrument.
44+
* Finish the instrument record.
4545
*
4646
* @param attributes A set of attributes to identify the instrument.
4747
* @since 1.56.0
4848
*/
49-
default void remove(Attributes attributes) {
50-
remove(attributes, Context.current());
49+
default void finish(Attributes attributes) {
50+
finish(attributes, Context.current());
5151
}
5252

5353
/**
54-
* Remove the instrument.
54+
* Finish the instrument record.
5555
*
5656
* @param attributes A set of attributes to identify the instrument.
5757
* @param context The explicit context to associate with this measurement.
5858
* @since 1.56.0
5959
*/
60-
default void remove(Attributes attributes, Context context) {}
60+
default void finish(Attributes attributes, Context context) {}
6161
}

api/all/src/main/java/io/opentelemetry/api/metrics/LongHistogram.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,21 +48,21 @@ public interface LongHistogram {
4848
void record(long value, Attributes attributes, Context context);
4949

5050
/**
51-
* Remove the instrument.
51+
* Finish the instrument record.
5252
*
5353
* @param attributes A set of attributes to identify the instrument.
5454
* @since 1.56.0
5555
*/
56-
default void remove(Attributes attributes) {
57-
remove(attributes, Context.current());
56+
default void finish(Attributes attributes) {
57+
finish(attributes, Context.current());
5858
}
5959

6060
/**
61-
* Remove the instrument.
61+
* Finish the instrument record.
6262
*
6363
* @param attributes A set of attributes to identify the instrument.
6464
* @param context The explicit context to associate with this measurement.
6565
* @since 1.56.0
6666
*/
67-
default void remove(Attributes attributes, Context context) {}
67+
default void finish(Attributes attributes, Context context) {}
6868
}

api/all/src/main/java/io/opentelemetry/api/metrics/LongUpDownCounter.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,21 @@ public interface LongUpDownCounter {
4747
void add(long value, Attributes attributes, Context context);
4848

4949
/**
50-
* Remove the instrument.
50+
* Finish the instrument record.
5151
*
5252
* @param attributes A set of attributes to identify the instrument.
5353
* @since 1.56.0
5454
*/
55-
default void remove(Attributes attributes) {
56-
remove(attributes, Context.current());
55+
default void finish(Attributes attributes) {
56+
finish(attributes, Context.current());
5757
}
5858

5959
/**
60-
* Remove the instrument.
60+
* Finish the instrument record.
6161
*
6262
* @param attributes A set of attributes to identify the instrument.
6363
* @param context The explicit context to associate with this measurement.
6464
* @since 1.56.0
6565
*/
66-
default void remove(Attributes attributes, Context context) {}
66+
default void finish(Attributes attributes, Context context) {}
6767
}

docs/apidiffs/current_vs_latest/opentelemetry-api.txt

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,33 @@ Comparing source compatibility of opentelemetry-api-1.61.0-SNAPSHOT.jar against
22
**** MODIFIED INTERFACE: PUBLIC ABSTRACT io.opentelemetry.api.metrics.DoubleCounter (not serializable)
33
*** MODIFIED INTERFACE: PUBLIC ABSTRACT io.opentelemetry.api.metrics.DoubleCounter (not serializable)
44
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
5-
+++ NEW METHOD: PUBLIC(+) void remove(io.opentelemetry.api.common.Attributes)
6-
+++ NEW METHOD: PUBLIC(+) void remove(io.opentelemetry.api.common.Attributes, io.opentelemetry.context.Context)
5+
+++ NEW METHOD: PUBLIC(+) void finish(io.opentelemetry.api.common.Attributes)
6+
+++ NEW METHOD: PUBLIC(+) void finish(io.opentelemetry.api.common.Attributes, io.opentelemetry.context.Context)
77
*** MODIFIED INTERFACE: PUBLIC ABSTRACT io.opentelemetry.api.metrics.DoubleGauge (not serializable)
88
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
9-
+++ NEW METHOD: PUBLIC(+) void remove(io.opentelemetry.api.common.Attributes)
10-
+++ NEW METHOD: PUBLIC(+) void remove(io.opentelemetry.api.common.Attributes, io.opentelemetry.context.Context)
9+
+++ NEW METHOD: PUBLIC(+) void finish(io.opentelemetry.api.common.Attributes)
10+
+++ NEW METHOD: PUBLIC(+) void finish(io.opentelemetry.api.common.Attributes, io.opentelemetry.context.Context)
1111
*** MODIFIED INTERFACE: PUBLIC ABSTRACT io.opentelemetry.api.metrics.DoubleHistogram (not serializable)
1212
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
13-
+++ NEW METHOD: PUBLIC(+) void remove(io.opentelemetry.api.common.Attributes)
14-
+++ NEW METHOD: PUBLIC(+) void remove(io.opentelemetry.api.common.Attributes, io.opentelemetry.context.Context)
13+
+++ NEW METHOD: PUBLIC(+) void finish(io.opentelemetry.api.common.Attributes)
14+
+++ NEW METHOD: PUBLIC(+) void finish(io.opentelemetry.api.common.Attributes, io.opentelemetry.context.Context)
1515
*** MODIFIED INTERFACE: PUBLIC ABSTRACT io.opentelemetry.api.metrics.DoubleUpDownCounter (not serializable)
1616
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
17-
+++ NEW METHOD: PUBLIC(+) void remove(io.opentelemetry.api.common.Attributes)
18-
+++ NEW METHOD: PUBLIC(+) void remove(io.opentelemetry.api.common.Attributes, io.opentelemetry.context.Context)
17+
+++ NEW METHOD: PUBLIC(+) void finish(io.opentelemetry.api.common.Attributes)
18+
+++ NEW METHOD: PUBLIC(+) void finish(io.opentelemetry.api.common.Attributes, io.opentelemetry.context.Context)
1919
*** MODIFIED INTERFACE: PUBLIC ABSTRACT io.opentelemetry.api.metrics.LongCounter (not serializable)
2020
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
21-
+++ NEW METHOD: PUBLIC(+) void remove(io.opentelemetry.api.common.Attributes)
22-
+++ NEW METHOD: PUBLIC(+) void remove(io.opentelemetry.api.common.Attributes, io.opentelemetry.context.Context)
21+
+++ NEW METHOD: PUBLIC(+) void finish(io.opentelemetry.api.common.Attributes)
22+
+++ NEW METHOD: PUBLIC(+) void finish(io.opentelemetry.api.common.Attributes, io.opentelemetry.context.Context)
2323
*** MODIFIED INTERFACE: PUBLIC ABSTRACT io.opentelemetry.api.metrics.LongGauge (not serializable)
2424
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
25-
+++ NEW METHOD: PUBLIC(+) void remove(io.opentelemetry.api.common.Attributes)
26-
+++ NEW METHOD: PUBLIC(+) void remove(io.opentelemetry.api.common.Attributes, io.opentelemetry.context.Context)
25+
+++ NEW METHOD: PUBLIC(+) void finish(io.opentelemetry.api.common.Attributes)
26+
+++ NEW METHOD: PUBLIC(+) void finish(io.opentelemetry.api.common.Attributes, io.opentelemetry.context.Context)
2727
*** MODIFIED INTERFACE: PUBLIC ABSTRACT io.opentelemetry.api.metrics.LongHistogram (not serializable)
2828
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
29-
+++ NEW METHOD: PUBLIC(+) void remove(io.opentelemetry.api.common.Attributes)
30-
+++ NEW METHOD: PUBLIC(+) void remove(io.opentelemetry.api.common.Attributes, io.opentelemetry.context.Context)
29+
+++ NEW METHOD: PUBLIC(+) void finish(io.opentelemetry.api.common.Attributes)
30+
+++ NEW METHOD: PUBLIC(+) void finish(io.opentelemetry.api.common.Attributes, io.opentelemetry.context.Context)
3131
*** MODIFIED INTERFACE: PUBLIC ABSTRACT io.opentelemetry.api.metrics.LongUpDownCounter (not serializable)
3232
=== CLASS FILE FORMAT VERSION: 52.0 <- 52.0
33-
+++ NEW METHOD: PUBLIC(+) void remove(io.opentelemetry.api.common.Attributes)
34-
+++ NEW METHOD: PUBLIC(+) void remove(io.opentelemetry.api.common.Attributes, io.opentelemetry.context.Context)
33+
+++ NEW METHOD: PUBLIC(+) void finish(io.opentelemetry.api.common.Attributes)
34+
+++ NEW METHOD: PUBLIC(+) void finish(io.opentelemetry.api.common.Attributes, io.opentelemetry.context.Context)

sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/SdkDoubleCounter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public void add(double increment) {
5757
}
5858

5959
@Override
60-
public void remove(Attributes attributes, Context context) {
60+
public void finish(Attributes attributes, Context context) {
6161
storage.remove(attributes, context);
6262
}
6363

0 commit comments

Comments
 (0)