Skip to content

Commit bda581e

Browse files
authored
Merge ea17a26 into b071538
2 parents b071538 + ea17a26 commit bda581e

4 files changed

Lines changed: 31 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- Properly reset metric flush flag on metric emission ([#3493](https://github.com/getsentry/sentry-java/pull/3493))
1212
- Use SecureRandom in favor of Random for Metrics ([#3495](https://github.com/getsentry/sentry-java/pull/3495))
1313
- Fix UncaughtExceptionHandlerIntegration Memory Leak ([#3398](https://github.com/getsentry/sentry-java/pull/3398))
14+
- Deprecated User.segment ([#3511](https://github.com/getsentry/sentry-java/pull/3511))
1415

1516
### Dependencies
1617

sentry/src/main/java/io/sentry/Baggage.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,11 +305,21 @@ public void setUserId(final @Nullable String userId) {
305305
set(DSCKeys.USER_ID, userId);
306306
}
307307

308+
/**
309+
* @deprecated has no effect and will be removed in the next major update.
310+
*/
311+
@Deprecated
312+
@SuppressWarnings("InlineMeSuggester")
308313
@ApiStatus.Internal
309314
public @Nullable String getUserSegment() {
310315
return get(DSCKeys.USER_SEGMENT);
311316
}
312317

318+
/**
319+
* @deprecated has no effect and will be removed in the next major update.
320+
*/
321+
@Deprecated
322+
@SuppressWarnings("InlineMeSuggester")
313323
@ApiStatus.Internal
314324
public void setUserSegment(final @Nullable String userSegment) {
315325
set(DSCKeys.USER_SEGMENT, userSegment);
@@ -403,6 +413,10 @@ public void setValuesFromScope(
403413
setSampled(null);
404414
}
405415

416+
/**
417+
* @deprecated has no effect and will be removed in the next major update.
418+
*/
419+
@Deprecated
406420
private static @Nullable String getSegment(final @NotNull User user) {
407421
if (user.getSegment() != null) {
408422
return user.getSegment();

sentry/src/main/java/io/sentry/TraceContext.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ public final class TraceContext implements JsonUnknown, JsonSerializable {
8080
return userId;
8181
}
8282

83+
/**
84+
* @deprecated has no effect and will be removed in the next major update.
85+
*/
86+
@Deprecated
8387
public @Nullable String getUserSegment() {
8488
return userSegment;
8589
}
@@ -116,6 +120,10 @@ private TraceContextUser(final @Nullable String id, final @Nullable String segme
116120
return id;
117121
}
118122

123+
/**
124+
* @deprecated has no effect and will be removed in the next major update.
125+
*/
126+
@Deprecated
119127
public @Nullable String getSegment() {
120128
return segment;
121129
}

sentry/src/main/java/io/sentry/protocol/User.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ public final class User implements JsonUnknown, JsonSerializable {
3434
/** Username of the user. */
3535
private @Nullable String username;
3636

37-
private @Nullable String segment;
37+
/**
38+
* @deprecated has no effect and will be removed in the next major update.
39+
*/
40+
@Deprecated private @Nullable String segment;
3841

3942
/** Remote IP address of the user. */
4043
private @Nullable String ipAddress;
@@ -224,7 +227,9 @@ public void setUsername(final @Nullable String username) {
224227
* Gets the segment of the user.
225228
*
226229
* @return the user segment.
230+
* @deprecated has no effect and will be removed in the next major update.
227231
*/
232+
@Deprecated
228233
public @Nullable String getSegment() {
229234
return segment;
230235
}
@@ -233,7 +238,9 @@ public void setUsername(final @Nullable String username) {
233238
* Sets the segment of the user.
234239
*
235240
* @param segment the segment.
241+
* @deprecated has no effect and will be removed in the next major update.
236242
*/
243+
@Deprecated
237244
public void setSegment(final @Nullable String segment) {
238245
this.segment = segment;
239246
}

0 commit comments

Comments
 (0)