Skip to content

test(async-profiler): [Sample Tests 33] Add an end-to-end test of a profiled transaction - #6325

Draft
runningcode wants to merge 2 commits into
no/core-integration-testfrom
no/async-profiler-integration-test
Draft

runningcode wants to merge 2 commits into
no/core-integration-testfrom
no/async-profiler-integration-test

Conversation

@runningcode

@runningcode runningcode commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

PR Stack (Sample Tests)


📜 Description

Adds ContinuousProfilerEndToEndTest to sentry-async-profiler. It ports the profiling part of sentry-samples-console's system test. A sampled transaction with the TRACE profile lifecycle starts the async profiler, and the test checks that the profile chunk reaches MockSentryServer with the transaction's profiler ID.

The traces path is in the temp dir. The profiler rejects a traces path with a . anywhere in its absolute form, as #6319 found, so a relative path fails in a checkout whose path has a dot in it.

💡 Motivation and Context

sentry-async-profiler's tests mock the transport and the profiler's surroundings. This one runs the real profiler and sends the chunk over HTTP, in under a second.

💚 How did you test it?

  • The test passes.
  • Expecting the transaction to have no profiler ID makes it fail.
  • In this checkout, 16 of JavaContinuousProfilerTest's tests fail with or without this PR. The path contains /.claude/, and the same dot check disables profiling: one test expects , as the rejected character and gets .. In CI, whose checkout path has no dot, they pass.

📝 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

The console sample's Kafka round trip into sentry-kafka, which retires the sample.

#skip-changelog

🤖 Generated with Claude Code

ContinuousProfilerEndToEndTest starts a sampled transaction with the
TRACE profile lifecycle and checks that its profile chunk reaches
MockSentryServer, linked to the transaction by the profiler ID. It
ports the profiling part of the console sample's system test.

The profiler rejects a traces path with a dot anywhere in its absolute
form, so the test puts it in the temp dir.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 20, 2026
@sentry

sentry Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

📲 Install Builds

Android

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

⚙️ sentry-android Build Distribution Settings

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant