Skip to content

Commit 1b80ffe

Browse files
committed
fix clirr
1 parent 448061e commit 1b80ffe

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

google-cloud-spanner/clirr-ignored-differences.xml

-14
Original file line numberDiff line numberDiff line change
@@ -349,20 +349,6 @@
349349
<method>com.google.cloud.spanner.spi.v1.SpannerRpc$StreamingCall executeQuery(com.google.spanner.v1.ExecuteSqlRequest, com.google.cloud.spanner.spi.v1.SpannerRpc$ResultStreamConsumer, java.util.Map)</method>
350350
<to>com.google.cloud.spanner.spi.v1.SpannerRpc$StreamingCall executeQuery(com.google.spanner.v1.ExecuteSqlRequest, java.util.Map, boolean)</to>
351351
</difference>
352-
<!-- (CompositeTracer is an internal API) -->
353-
<difference>
354-
<differenceType>7005</differenceType>
355-
<className>com/google/cloud/spanner/CompositeTracer$CompositeTracer</className>
356-
<method>void recordGFELatency(java.lang.Long)</method>
357-
<to>void recordGFELatency(java.lang.Float)</to>
358-
</difference>
359-
<!-- (CompositeTracer is an internal API) -->
360-
<difference>
361-
<differenceType>7005</differenceType>
362-
<className>com/google/cloud/spanner/CompositeTracer$CompositeTracer</className>
363-
<method>void recordAFELatency(java.lang.Long)</method>
364-
<to>void recordAFELatency(java.lang.Float)</to>
365-
</difference>
366352
<difference>
367353
<differenceType>7006</differenceType>
368354
<className>com/google/cloud/spanner/spi/v1/GapicSpannerRpc</className>

google-cloud-spanner/src/main/java/com/google/cloud/spanner/CompositeTracer.java

+22-4
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,11 @@ public void addAttributes(Map<String, String> attributes) {
191191
}
192192
}
193193

194-
public void recordGFELatency(Float gfeLatency) {
194+
@Deprecated
195+
public void recordGFELatency(Long gfeLatency) {
195196
for (ApiTracer child : children) {
196197
if (child instanceof BuiltInMetricsTracer) {
197-
((BuiltInMetricsTracer) child).recordGFELatency(gfeLatency);
198+
((BuiltInMetricsTracer) child).recordGFELatency(Float.valueOf(gfeLatency));
198199
}
199200
}
200201
}
@@ -207,10 +208,11 @@ public void recordGfeHeaderMissingCount(Long value) {
207208
}
208209
}
209210

210-
public void recordAFELatency(Float afeLatency) {
211+
@Deprecated
212+
public void recordAFELatency(Long afeLatency) {
211213
for (ApiTracer child : children) {
212214
if (child instanceof BuiltInMetricsTracer) {
213-
((BuiltInMetricsTracer) child).recordAFELatency(afeLatency);
215+
((BuiltInMetricsTracer) child).recordAFELatency(Float.valueOf(afeLatency));
214216
}
215217
}
216218
}
@@ -222,4 +224,20 @@ public void recordAfeHeaderMissingCount(Long value) {
222224
}
223225
}
224226
}
227+
228+
public void recordGFELatency(Float gfeLatency) {
229+
for (ApiTracer child : children) {
230+
if (child instanceof BuiltInMetricsTracer) {
231+
((BuiltInMetricsTracer) child).recordGFELatency(gfeLatency);
232+
}
233+
}
234+
}
235+
236+
public void recordAFELatency(Float afeLatency) {
237+
for (ApiTracer child : children) {
238+
if (child instanceof BuiltInMetricsTracer) {
239+
((BuiltInMetricsTracer) child).recordAFELatency(afeLatency);
240+
}
241+
}
242+
}
225243
}

0 commit comments

Comments
 (0)