Skip to content

[don't review][ just testing] fix(telemetry): Defer CLI execution from configuration to execution phase#1187

Draft
runningcode wants to merge 1 commit into
mainfrom
no/gradle-82-defer-cli-to-execution-phase
Draft

[don't review][ just testing] fix(telemetry): Defer CLI execution from configuration to execution phase#1187
runningcode wants to merge 1 commit into
mainfrom
no/gradle-82-defer-cli-to-execution-phase

Conversation

@runningcode
Copy link
Copy Markdown
Contributor

Summary

  • Remove SentryCliInfoValueSource and SentryCliVersionValueSource which spawned sentry-cli processes during configuration phase, causing Gradle to track them as configuration cache inputs and re-evaluate them on every build (~38% overhead on large projects)
  • Use heuristic values during configuration (URL-based SaaS detection, BuildConfig.CliVersion) instead of calling sentry-cli
  • Defer actual CLI execution to the first startTask() invocation (execution phase) via ProcessBuilder, where the org and exact CLI version are used to enrich telemetry tags

Fixes #1100
Fixes GRADLE-82

🤖 Generated with Claude Code

…hase (GRADLE-82)

The telemetry ValueSources (SentryCliInfoValueSource and
SentryCliVersionValueSource) were spawning sentry-cli processes during
configuration phase. Gradle tracked these as configuration cache inputs
and re-evaluated them on every build, causing ~38% overhead on large
projects.

Move CLI execution to the execution phase by:
- Using heuristic values (URL-based SaaS detection, BuildConfig version)
  during configuration instead of calling sentry-cli
- Deferring actual CLI calls to the first startTask() invocation via
  ProcessBuilder, where they enrich telemetry with org and version data
- Removing the two ValueSource classes that caused the overhead

Fixes GRADLE-82

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 12, 2026

GRADLE-82

@runningcode runningcode changed the title fix(telemetry): Defer CLI execution from configuration to execution phase [don't review][ just testing] fix(telemetry): Defer CLI execution from configuration to execution phase May 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

### Features

- Defer CLI execution from configuration to execution phase ([#1187](https://github.com/getsentry/sentry-android-gradle-plugin/pull/1187))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by 🚫 dangerJS against 830425e

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.

Telemetry ValueSources cause Configuration Phase Overhead

1 participant