Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate enableTracing in v7 #3777

Merged
merged 3 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ final class ManifestMetadataReader {
static final String UNCAUGHT_EXCEPTION_HANDLER_ENABLE =
"io.sentry.uncaught-exception-handler.enable";

static final String TRACING_ENABLE = "io.sentry.traces.enable";
@Deprecated static final String TRACING_ENABLE = "io.sentry.traces.enable";
static final String TRACES_SAMPLE_RATE = "io.sentry.traces.sample-rate";
static final String TRACES_ACTIVITY_ENABLE = "io.sentry.traces.activity.enable";
static final String TRACES_ACTIVITY_AUTO_FINISH_ENABLE =
Expand Down
9 changes: 8 additions & 1 deletion sentry/src/main/java/io/sentry/SentryOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -913,14 +913,21 @@ public void setSampleRate(Double sampleRate) {
* <p>NOTE: There is also {@link SentryOptions#isTracingEnabled()} which checks other options as
* well.
*
* @deprecated We're removing enableTracing in 8.0
* @return true if enabled, false if disabled, null can mean enabled if {@link
* SentryOptions#getTracesSampleRate()} or {@link SentryOptions#getTracesSampler()} are set.
*/
@Deprecated
public @Nullable Boolean getEnableTracing() {
return enableTracing;
}

/** Enables generation of transactions and propagation of trace data. */
/**
* Enables generation of transactions and propagation of trace data.
*
* @deprecated We're removing enableTracing in 8.0
*/
@Deprecated
public void setEnableTracing(@Nullable Boolean enableTracing) {
this.enableTracing = enableTracing;
}
Expand Down
1 change: 1 addition & 0 deletions sentry/src/main/java/io/sentry/TracesSampler.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public TracesSampler(final @NotNull SentryOptions options) {
this.random = random;
}

@SuppressWarnings("deprecation")
@NotNull
TracesSamplingDecision sample(final @NotNull SamplingContext samplingContext) {
final TracesSamplingDecision samplingContextSamplingDecision =
Expand Down
Loading