Skip to content

ci(android): Collect transactions as evidence in the verify-pr test workflow - #7183

Merged
antonis merged 2 commits into
mainfrom
verify-pr/span-evidence
Dec 4, 2026
Merged

antonis merged 2 commits into
mainfrom
verify-pr/span-evidence

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Enhancement

📜 Description

verify-pr-spike.yml can use a span inside a transaction as evidence, with the new boolean input transactions (default false).

  • transactions: false: the run is the same as on main. No transaction ids go to the fetch job, a side without an error id fails the build job, and results.json, without.json and with.json have the same shape as today.
  • transactions: true, build job (spike.py): also reads each side's transaction ids from the sample's 'Transaction beforeSend:', '<event id>' line. beforeSendTransaction on main already logs it, and it is distinct from the 'Event beforeSend:' error line. They go to results.json as runs.<side>.transaction_ids. Each side needs at least one transaction id, and error ids are optional. The first 10 transaction ids per side go to the fetch job.
  • transactions: true, fetch job: reads each transaction by id from the same project endpoints. It refuses a response that isn't type: transaction or whose verify.run_id differs.
    • Fields kept: transaction, trace (op, status, span_id, data of contexts.trace), and for every span op, description, status, data, start_timestamp, timestamp, span_id and parent_span_id, as stored. Tags (including turbo_module.*) and processing errors are kept the same way as for errors.
    • Each side's file adds transactions and missing_transactions, next to events.
    • One 180 s deadline covers all of a side's transaction requests. The ids still unread are polled in rounds, and the detail endpoint falls back to /json/ when it can't be read in time.
    • A transaction still unavailable at the deadline goes to missing_transactions with its id and last result. The side fails only when none of its transactions could be read.
    • Error events are read exactly as before.
  • Fetch-only mode: fetch_without_transaction_ids and fetch_with_transaction_ids (at most 10 each). Giving either one turns transactions on.

The workflow stays dispatch-only on main. The build job has no secrets, and SENTRY_AUTH_TOKEN stays in the fetch job, which checks out no code. No new token or permission.

💡 Motivation and Context

#7169 (thread.id on ui.long-task spans, the test PR for this) and #7168 (TTID/TTFD span end times, already merged) need span evidence.

a. Sample on main, for #7169. longTaskIntegration({ minDurationMs: 100, spans: true }) is on. UI profiling is off: there's no _experiments.profilingOptions, so no span gets thread.id. With profilingOptions set and tracing on, uiProfilingIntegration sets thread.id on every span at spanStart, the root span included. The value is NATIVE.getCurrentThreadId() (the JS thread's Process.myTid()) on any API level, and the Hermes id 2^32 only on API 35+ with profilesSampleRate not above 0. The blocking buttons exist: "Block JS thread (300 ms)" on Performance and "Block JS thread for 5s" on Errors.

b. Emulator. ANDROID_API_LEVEL: "30" (Android 11). #7169 can run on it with the native thread id. The Hermes thread id (API 35, Android 15) is not covered.

Needs a decision:

  • The cap of 10 and "first 10" are a guess. A long flow could push the scenario's transaction past it, and a fetch-only run with ids from results.json covers that.
  • Span data and contexts.trace.data are kept whole and printed to the public job log. Today that's only sample data.
  • The skill's STEP 3 allows only a new button as a sample change, so the profilingOptions change for feat(core): Link long task spans to the JS profile #7169 needs a rule change or a change on main (getsentry/team-sdk-skills#242).

No clear rule:

  • Which transaction is the scenario's. The workflow keeps them all, and the skill picks one (getsentry/team-sdk-skills#242).
  • For feat(core): Link long task spans to the JS profile #7169, a long task delivered while the transaction is still open becomes a real child span through startInactiveSpan, so it gets thread.id on both sides. Only long tasks added in processEvent differ. The kept fields don't tell the two apart.

📝 Checklist

  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • No breaking changes.

🔮 Next steps

For #7169: _experiments.profilingOptions in the sample, then a run with transactions: true.

#skip-changelog

via Antonis Lilis.

--

View Session [Sentry]

…orkflow

Co-Authored-By: Antonis Lilis <antonis.lilis@sentry.io>
@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

⚪ None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor
Fails
🚫 Pull request is not ready for merge, please add the "ready-to-merge" label to the pull request

Generated by 🚫 dangerJS against f830725

@github-actions github-actions Bot added the risk: medium PR risk score: medium label Dec 4, 2026
@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

PR risk: medium

For commit f830725.

The model rated this change low. It was raised to medium because:

  • R6: build or release configuration changed: .github/verify-pr-spike/spike.py, .github/workflows/verify-pr-spike.yml
  • R7: the model was not confident enough that the change is low

This label is a hint for reviewers, not an approval.

…ansactions

Co-Authored-By: Antonis Lilis <antonis.lilis@sentry.io>
@github-actions github-actions Bot added risk: medium PR risk score: medium and removed risk: medium PR risk score: medium labels Dec 4, 2026
@antonis
antonis marked this pull request as ready for review December 4, 2026 12:32
@antonis
antonis merged commit 0ec76a1 into main Dec 4, 2026
66 of 74 checks passed
@github-actions github-actions Bot removed the risk: medium PR risk score: medium label Dec 4, 2026
@antonis
antonis deleted the verify-pr/span-evidence branch December 4, 2026 12:32
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