Skip to content

Commit c2cad45

Browse files
authored
Remove traceHeaders method (#3718)
* replace synchronized with lock * Remove deprecated reportFullDisplayed * Remove deprecated traceHeaders method
1 parent 6101b73 commit c2cad45

File tree

13 files changed

+0
-110
lines changed

13 files changed

+0
-110
lines changed

sentry/api/sentry.api

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,6 @@ public final class io/sentry/HubAdapter : io/sentry/IHub {
608608
public fun setUser (Lio/sentry/protocol/User;)V
609609
public fun startSession ()V
610610
public fun startTransaction (Lio/sentry/TransactionContext;Lio/sentry/TransactionOptions;)Lio/sentry/ITransaction;
611-
public fun traceHeaders ()Lio/sentry/SentryTraceHeader;
612611
public fun withIsolationScope (Lio/sentry/ScopeCallback;)V
613612
public fun withScope (Lio/sentry/ScopeCallback;)V
614613
}
@@ -674,7 +673,6 @@ public final class io/sentry/HubScopesWrapper : io/sentry/IHub {
674673
public fun setUser (Lio/sentry/protocol/User;)V
675674
public fun startSession ()V
676675
public fun startTransaction (Lio/sentry/TransactionContext;Lio/sentry/TransactionOptions;)Lio/sentry/ITransaction;
677-
public fun traceHeaders ()Lio/sentry/SentryTraceHeader;
678676
public fun withIsolationScope (Lio/sentry/ScopeCallback;)V
679677
public fun withScope (Lio/sentry/ScopeCallback;)V
680678
}
@@ -915,7 +913,6 @@ public abstract interface class io/sentry/IScopes {
915913
public abstract fun startTransaction (Lio/sentry/TransactionContext;Lio/sentry/TransactionOptions;)Lio/sentry/ITransaction;
916914
public fun startTransaction (Ljava/lang/String;Ljava/lang/String;)Lio/sentry/ITransaction;
917915
public fun startTransaction (Ljava/lang/String;Ljava/lang/String;Lio/sentry/TransactionOptions;)Lio/sentry/ITransaction;
918-
public abstract fun traceHeaders ()Lio/sentry/SentryTraceHeader;
919916
public abstract fun withIsolationScope (Lio/sentry/ScopeCallback;)V
920917
public abstract fun withScope (Lio/sentry/ScopeCallback;)V
921918
}
@@ -1450,7 +1447,6 @@ public final class io/sentry/NoOpHub : io/sentry/IHub {
14501447
public fun setUser (Lio/sentry/protocol/User;)V
14511448
public fun startSession ()V
14521449
public fun startTransaction (Lio/sentry/TransactionContext;Lio/sentry/TransactionOptions;)Lio/sentry/ITransaction;
1453-
public fun traceHeaders ()Lio/sentry/SentryTraceHeader;
14541450
public fun withIsolationScope (Lio/sentry/ScopeCallback;)V
14551451
public fun withScope (Lio/sentry/ScopeCallback;)V
14561452
}
@@ -1611,7 +1607,6 @@ public final class io/sentry/NoOpScopes : io/sentry/IScopes {
16111607
public fun setUser (Lio/sentry/protocol/User;)V
16121608
public fun startSession ()V
16131609
public fun startTransaction (Lio/sentry/TransactionContext;Lio/sentry/TransactionOptions;)Lio/sentry/ITransaction;
1614-
public fun traceHeaders ()Lio/sentry/SentryTraceHeader;
16151610
public fun withIsolationScope (Lio/sentry/ScopeCallback;)V
16161611
public fun withScope (Lio/sentry/ScopeCallback;)V
16171612
}
@@ -2208,7 +2203,6 @@ public final class io/sentry/Scopes : io/sentry/IScopes, io/sentry/metrics/Metri
22082203
public fun startSession ()V
22092204
public fun startSpanForMetric (Ljava/lang/String;Ljava/lang/String;)Lio/sentry/ISpan;
22102205
public fun startTransaction (Lio/sentry/TransactionContext;Lio/sentry/TransactionOptions;)Lio/sentry/ITransaction;
2211-
public fun traceHeaders ()Lio/sentry/SentryTraceHeader;
22122206
public fun withIsolationScope (Lio/sentry/ScopeCallback;)V
22132207
public fun withScope (Lio/sentry/ScopeCallback;)V
22142208
}
@@ -2274,7 +2268,6 @@ public final class io/sentry/ScopesAdapter : io/sentry/IScopes {
22742268
public fun setUser (Lio/sentry/protocol/User;)V
22752269
public fun startSession ()V
22762270
public fun startTransaction (Lio/sentry/TransactionContext;Lio/sentry/TransactionOptions;)Lio/sentry/ITransaction;
2277-
public fun traceHeaders ()Lio/sentry/SentryTraceHeader;
22782271
public fun withIsolationScope (Lio/sentry/ScopeCallback;)V
22792272
public fun withScope (Lio/sentry/ScopeCallback;)V
22802273
}
@@ -2384,7 +2377,6 @@ public final class io/sentry/Sentry {
23842377
public static fun startTransaction (Ljava/lang/String;Ljava/lang/String;)Lio/sentry/ITransaction;
23852378
public static fun startTransaction (Ljava/lang/String;Ljava/lang/String;Lio/sentry/TransactionOptions;)Lio/sentry/ITransaction;
23862379
public static fun startTransaction (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/sentry/TransactionOptions;)Lio/sentry/ITransaction;
2387-
public static fun traceHeaders ()Lio/sentry/SentryTraceHeader;
23882380
public static fun withIsolationScope (Lio/sentry/ScopeCallback;)V
23892381
public static fun withScope (Lio/sentry/ScopeCallback;)V
23902382
}

sentry/src/main/java/io/sentry/HubAdapter.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,6 @@ public boolean isAncestorOf(final @Nullable IScopes otherScopes) {
278278
return Sentry.startTransaction(transactionContext, transactionOptions);
279279
}
280280

281-
@Deprecated
282-
@Override
283-
public @Nullable SentryTraceHeader traceHeaders() {
284-
return Sentry.traceHeaders();
285-
}
286-
287281
@Override
288282
public void setSpanContext(
289283
final @NotNull Throwable throwable,

sentry/src/main/java/io/sentry/HubScopesWrapper.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,11 +273,6 @@ public boolean isAncestorOf(final @Nullable IScopes otherScopes) {
273273
return scopes.startTransaction(transactionContext, transactionOptions);
274274
}
275275

276-
@Override
277-
public @Nullable SentryTraceHeader traceHeaders() {
278-
return scopes.traceHeaders();
279-
}
280-
281276
@ApiStatus.Internal
282277
@Override
283278
public void setSpanContext(

sentry/src/main/java/io/sentry/IScopes.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -583,17 +583,6 @@ ITransaction startTransaction(
583583
final @NotNull TransactionContext transactionContext,
584584
final @NotNull TransactionOptions transactionOptions);
585585

586-
/**
587-
* Returns the "sentry-trace" header that allows tracing across services. Can also be used in
588-
* <meta> HTML tags. Also see {@link IScopes#getBaggage()}.
589-
*
590-
* @deprecated please use {@link IScopes#getTraceparent()} instead.
591-
* @return sentry trace header or null
592-
*/
593-
@Deprecated
594-
@Nullable
595-
SentryTraceHeader traceHeaders();
596-
597586
/**
598587
* Associates {@link ISpan} and the transaction name with the {@link Throwable}. Used to determine
599588
* in which trace the exception has been thrown in framework integrations.

sentry/src/main/java/io/sentry/NoOpHub.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -242,13 +242,6 @@ public boolean isAncestorOf(@Nullable IScopes otherScopes) {
242242
return NoOpTransaction.getInstance();
243243
}
244244

245-
@Override
246-
@Deprecated
247-
@SuppressWarnings("InlineMeSuggester")
248-
public @NotNull SentryTraceHeader traceHeaders() {
249-
return new SentryTraceHeader(SentryId.EMPTY_ID, SpanId.EMPTY_ID, true);
250-
}
251-
252245
@Override
253246
public void setSpanContext(
254247
final @NotNull Throwable throwable,

sentry/src/main/java/io/sentry/NoOpScopes.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -237,13 +237,6 @@ public boolean isAncestorOf(@Nullable IScopes otherScopes) {
237237
return NoOpTransaction.getInstance();
238238
}
239239

240-
@Override
241-
@Deprecated
242-
@SuppressWarnings("InlineMeSuggester")
243-
public @NotNull SentryTraceHeader traceHeaders() {
244-
return new SentryTraceHeader(SentryId.EMPTY_ID, SpanId.EMPTY_ID, true);
245-
}
246-
247240
@Override
248241
public void setSpanContext(
249242
final @NotNull Throwable throwable,

sentry/src/main/java/io/sentry/Scopes.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -900,13 +900,6 @@ public void flush(long timeoutMillis) {
900900
return transaction;
901901
}
902902

903-
@Deprecated
904-
@SuppressWarnings("InlineMeSuggester")
905-
@Override
906-
public @Nullable SentryTraceHeader traceHeaders() {
907-
return getTraceparent();
908-
}
909-
910903
@Override
911904
@ApiStatus.Internal
912905
public void setSpanContext(

sentry/src/main/java/io/sentry/ScopesAdapter.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,6 @@ public boolean isAncestorOf(final @Nullable IScopes otherScopes) {
276276
return Sentry.startTransaction(transactionContext, transactionOptions);
277277
}
278278

279-
@Deprecated
280-
@Override
281-
@SuppressWarnings("deprecation")
282-
public @Nullable SentryTraceHeader traceHeaders() {
283-
return Sentry.traceHeaders();
284-
}
285-
286279
@ApiStatus.Internal
287280
@Override
288281
public void setSpanContext(

sentry/src/main/java/io/sentry/Sentry.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,19 +1031,6 @@ public static void endSession() {
10311031
return getCurrentScopes().startTransaction(transactionContext, transactionOptions);
10321032
}
10331033

1034-
/**
1035-
* Returns the "sentry-trace" header that allows tracing across services. Can also be used in
1036-
* <meta> HTML tags. Also see {@link Sentry#getBaggage()}.
1037-
*
1038-
* @deprecated please use {@link Sentry#getTraceparent()} instead.
1039-
* @return sentry trace header or null
1040-
*/
1041-
@Deprecated
1042-
@SuppressWarnings("InlineMeSuggester")
1043-
public static @Nullable SentryTraceHeader traceHeaders() {
1044-
return getCurrentScopes().traceHeaders();
1045-
}
1046-
10471034
/**
10481035
* Gets the current active transaction or span.
10491036
*

sentry/src/test/java/io/sentry/HubAdapterTest.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,6 @@ class HubAdapterTest {
228228
verify(scopes).startTransaction(eq(transactionContext), eq(transactionOptions))
229229
}
230230

231-
@Test fun `traceHeaders calls Hub`() {
232-
HubAdapter.getInstance().traceHeaders()
233-
verify(scopes).traceHeaders()
234-
}
235-
236231
@Test fun `setSpanContext calls Hub`() {
237232
val throwable = mock<Throwable>()
238233
val span = mock<ISpan>()

0 commit comments

Comments
 (0)