File tree Expand file tree Collapse file tree 3 files changed +18
-3
lines changed
main/java/com/palantir/tracing
test/java/com/palantir/tracing Expand file tree Collapse file tree 3 files changed +18
-3
lines changed Original file line number Diff line number Diff line change 1+ type : improvement
2+ improvement :
3+ description : Methods to complete spans with metadata are now deprecated.
4+ links :
5+ - https://github.com/palantir/tracing-java/pull/347
Original file line number Diff line number Diff line change @@ -455,7 +455,12 @@ public static void fastCompleteSpan() {
455455 fastCompleteSpan (Collections .emptyMap ());
456456 }
457457
458- /** Like {@link #fastCompleteSpan()}, but adds {@code metadata} to the current span being completed. */
458+ /**
459+ * Like {@link #fastCompleteSpan()}, but adds {@code metadata} to the current span being completed.
460+ *
461+ * @deprecated Use {@link #fastCompleteSpan()}
462+ */
463+ @ Deprecated
459464 public static void fastCompleteSpan (Map <String , String > metadata ) {
460465 Trace trace = currentTrace .get ();
461466 if (trace != null ) {
@@ -483,10 +488,13 @@ public static Optional<Span> completeSpan() {
483488 }
484489
485490 /**
486- * Like {@link #completeSpan()}, but adds {@code metadata} to the current span being completed. If the return value
487- * is not used, prefer {@link Tracer#fastCompleteSpan(Map)}.
491+ * Like {@link #completeSpan()}, but adds {@code metadata} to the current span being completed.
492+ * If the return value is not used, prefer {@link Tracer#fastCompleteSpan(Map)}.
493+ *
494+ * @deprecated Use {@link #fastCompleteSpan()}
488495 */
489496 @ CheckReturnValue
497+ @ Deprecated
490498 public static Optional <Span > completeSpan (Map <String , String > metadata ) {
491499 Trace trace = currentTrace .get ();
492500 if (trace == null ) {
Original file line number Diff line number Diff line change @@ -249,6 +249,7 @@ public void testCompletedSpanHasCorrectSpanType() throws Exception {
249249 }
250250
251251 @ Test
252+ @ SuppressWarnings ("deprecation" )
252253 public void testCompleteSpanWithMetadataIncludesMetadata () {
253254 Map <String , String > metadata = ImmutableMap .of (
254255 "key1" , "value1" ,
@@ -275,6 +276,7 @@ public void testFastCompleteSpan() {
275276 }
276277
277278 @ Test
279+ @ SuppressWarnings ("deprecation" )
278280 public void testFastCompleteSpanWithMetadata () {
279281 Tracer .subscribe ("1" , observer1 );
280282 Map <String , String > metadata = ImmutableMap .of ("key" , "value" );
You can’t perform that action at this time.
0 commit comments