Skip to content

ref(core): [Tracing API Cleanup 1] Remove deprecated Instrumenter option - #6252

Merged
adinauer merged 4 commits into
9.x.xfrom
ref/remove-instrumenter-v9
Oct 29, 2026
Merged

adinauer merged 4 commits into
9.x.xfrom
ref/remove-instrumenter-v9

Conversation

@adinauer

@adinauer adinauer commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

PR Stack (Tracing API Cleanup)


📜 Description

Removes the deprecated Instrumenter configuration and related tracing code for Java SDK 9:

  • removes the Instrumenter enum and SentryOptions option
  • removes instrumenter state from SpanContext
  • removes instrumenter-specific ISpan.startChild overloads and filtering
  • updates SDK integrations and OpenTelemetry adapters to use SpanOptions for explicit start timestamps

This complements #6243, which removes the deprecated OpenTelemetry implementations that originally required instrumenter selection.

💡 Motivation and Context

The current OpenTelemetry integration no longer relies on choosing between SENTRY and OTEL instrumenters. Keeping this deprecated option adds public API and conditional tracing paths without a supported use case. Java SDK 9 is the appropriate breaking-change boundary for removing it.

💚 How did you test it?

  • ./gradlew spotlessApply apiDump
  • ./gradlew ':sentry:test' ':sentry-android-core:testReleaseUnitTest' ':sentry-android-sqlite:testReleaseUnitTest' ':sentry-compose:testReleaseUnitTest' ':sentry-opentelemetry:sentry-opentelemetry-core:test' ':sentry-opentelemetry:sentry-opentelemetry-bootstrap:test' --info
    • 5,691 tests passed and 2 skipped

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

None.

⚠️ Merge this PR using a merge commit (not squash). Only the collection branch is squash-merged into main.

adinauer and others added 2 commits October 13, 2026 17:08
Remove the Instrumenter enum and its tracing configuration now that OpenTelemetry no longer depends on instrumenter selection. Simplify span creation to use SpanOptions for explicit start timestamps.

Co-Authored-By: Claude <noreply@anthropic.com>
@sentry

sentry Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.62.0 (1) release

⚙️ sentry-android Build Distribution Settings

public fun startChild (Ljava/lang/String;)Lio/sentry/ISpan;
public fun startChild (Ljava/lang/String;Ljava/lang/String;)Lio/sentry/ISpan;
public fun startChild (Ljava/lang/String;Ljava/lang/String;Lio/sentry/SentryDate;)Lio/sentry/ISpan;
public fun startChild (Ljava/lang/String;Ljava/lang/String;Lio/sentry/SentryDate;Lio/sentry/Instrumenter;)Lio/sentry/ISpan;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are marked internal on ISpan

@adinauer
adinauer marked this pull request as ready for review October 19, 2026 12:33
adinauer added a commit to getsentry/sentry-docs that referenced this pull request Oct 27, 2026
List the OpenTelemetry integration and instrumenter APIs removed in v9 and direct readers to the supported Java OpenTelemetry documentation.

Refs getsentry/sentry-java#6243

Refs getsentry/sentry-java#6252

Co-Authored-By: Claude <noreply@anthropic.com>
Keep the OpenTelemetry classes removed by the base branch and retain both breaking-change entries in the changelog.

@markushi markushi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one! I do have one concern I'd like to get addressed, but otherwise LGTM!

finishAppStartSpan();
}
}
spanOptions.setStartTimestamp(ttidStartTime);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

m: Could you duplicate the spanOptions here? One for appStartSpan and one for the ttidSpan. I feel like otherwise it's super brittle as we're mutating the options, and there's no guarantee that appStartTime won't read the mutated options at a later point.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, let's improve this outside the PR.

Preserve the timestamp-and-options startChild call shape while removing Instrumenter. Keep integration call sites close to their previous form instead of setting timestamps directly on SpanOptions.

Co-Authored-By: Claude <noreply@anthropic.com>
@adinauer adinauer changed the title ref(core): Remove deprecated Instrumenter option ref(core): [Tracing API Cleanup 1] Remove deprecated Instrumenter option Oct 29, 2026
@adinauer
adinauer merged commit 8d690e6 into 9.x.x Oct 29, 2026
39 of 40 checks passed
@adinauer
adinauer deleted the ref/remove-instrumenter-v9 branch October 29, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants