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

Extremely excessive --info logging by Sentry in build logs

btseytlinTCP opened this issue · comments

Integration

sentry-android

Build System

Gradle

AGP Version

8.3.0

Proguard

Enabled

Version

7.8.0

Steps to Reproduce

Also, sentry gradle version: io.sentry.android.gradle:4.4.1
Note: This was also happening on Sentry SDK 6.33.0, and gradle version 3.12.0

During this step of our github action build process
./gradlew :app:bundle[insert flavor/build type] --info

jobs:
  publishDevRemote:
    timeout-minutes: 60
    name: 'Build and Publish devRemote APK'
    runs-on: ubuntu-latest
    steps:
      - name: 'Checkout to branch'
        uses: actions/checkout@v2
      - name: 'Get release tag'
        id: release
        run: echo "::set-output name=tag::$(echo ${GITHUB_REF##*/})"
      - name: set up JDK 17
        uses: actions/setup-java@v2
        with:
          distribution: 'zulu'
          java-version: '17'
      - name: 'Build devRemote'
        run: ./gradlew :app:bundleDevRemote  --info **// This --info line seems to be what triggers to log aggressively**

Thank you for looking at this

Expected Result

A reasonable amount of logging :) Unfortunately I can't run my github action build command in --info mode or else Sentry will overflood it with way too many logs. Is there a way to tune this down? Or turn it off for Sentry?

Actual Result

80,000+ lines of this identical "memoized" line resulting in enormous log files that are essentially unusable
image
image

Hey @btseytlinTCP thanks for reporting - this should not happen, we'll investigate. @markushi can you take a look pls?

The underlying culprit seems to be here as this invokes the getter (which creates the log statement) for every instrumented class.