getsentry / sentry-android-gradle-plugin

Gradle plugin for Sentry Android. Upload proguard, debug files, and more.

Home Page:https://docs.sentry.io/platforms/android/gradle/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Telemetry sentry-cli commands executed with telemetry=false

ninniuz opened this issue · comments

Gradle Version

8.5

AGP Version

8.2.1

Code Minifier/Optimizer

R8

Version

4.0.0

Sentry SDK Version

7.0.0

Steps to Reproduce

  1. disable telemetry with sentry.telemetry = false
  2. run a Gradle task with debug logging, e.g. ./gradlew installDebug --debug
  3. check executed commands in the debug log, e.g. ./gradlew installDebug --debug | grep sentry-cli

Expected Result

There should not be sentry-cli --log-level=error --version and sentry-cli info runs since telemetry is disabled

Actual Result

I am getting a lot of runs of both commands, potentially slowing the build down.

2024-01-08T12:17:27.612+0100 [INFO] [org.gradle.process.internal.DefaultExecHandle] Starting process 'command '/var/folders/_z/hzg2r89j3sb0j04v1zjnn3sr0000gn/T/.sentry-cli13048158665933968573.exe''. Working directory: <redacted> Command: /var/folders/_z/hzg2r89j3sb0j04v1zjnn3sr0000gn/T/.sentry-cli13048158665933968573.exe --log-level=error --version
2024-01-08T12:17:27.612+0100 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Waiting until process started: command '/var/folders/_z/hzg2r89j3sb0j04v1zjnn3sr0000gn/T/.sentry-cli13048158665933968573.exe'.
2024-01-08T12:17:27.615+0100 [INFO] [org.gradle.process.internal.DefaultExecHandle] Successfully started process 'command '/var/folders/_z/hzg2r89j3sb0j04v1zjnn3sr0000gn/T/.sentry-cli13048158665933968573.exe''
2024-01-08T12:17:27.625+0100 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'command '/var/folders/_z/hzg2r89j3sb0j04v1zjnn3sr0000gn/T/.sentry-cli13048158665933968573.exe'' finished with exit value 0 (state: SUCCEEDED)
2024-01-08T12:17:27.625+0100 [INFO] [org.gradle.process.internal.DefaultExecHandle] Starting process 'command '/var/folders/_z/hzg2r89j3sb0j04v1zjnn3sr0000gn/T/.sentry-cli13048158665933968573.exe''. Working directory: <redacted> Command: /var/folders/_z/hzg2r89j3sb0j04v1zjnn3sr0000gn/T/.sentry-cli13048158665933968573.exe info
2024-01-08T12:17:27.625+0100 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Waiting until process started: command '/var/folders/_z/hzg2r89j3sb0j04v1zjnn3sr0000gn/T/.sentry-cli13048158665933968573.exe'.
2024-01-08T12:17:27.628+0100 [INFO] [org.gradle.process.internal.DefaultExecHandle] Successfully started process 'command '/var/folders/_z/hzg2r89j3sb0j04v1zjnn3sr0000gn/T/.sentry-cli13048158665933968573.exe''
2024-01-08T12:17:27.790+0100 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Process 'command '/var/folders/_z/hzg2r89j3sb0j04v1zjnn3sr0000gn/T/.sentry-cli13048158665933968573.exe'' finished with exit value 0 (state: SUCCEEDED)

@ninniuz thanks for the report. Just to be sure, you are seeing Sentry telemetry has been disabled. message(s) in your log, correct?

We'll have to guard the commands with telemetry flag check.

@adinauer where am I expected to see this log line?

@ninniuz it's an INFO log message you should be seeing on the same build you ran grep sentry-cli on. See

@adinauer I am seeing

[sentry] Sentry is running against a self hosted instance. Telemetry has been disabled.

since I am using a self hosted Sentry instance 👍

@stefanosiano are you actively working on this or should @lbloder take over?