Subversion Repositories SmartDukaan

Rev

Hide changed files | Details | Compare with Previous | Blame | RSS feed

Filtering Options

Rev Age Author Path Log message Diff Changes
37726 18 d 15 h amit /trunk/ sentry: stop developer laptops reporting to the live GlitchTip board

GlitchTip #586 was 57 events tagged environment=production whose stack read
/opt/homebrew/Cellar/tomcat@8/8.5.100/libexec/... with server_name set to a
developer's machine. Nothing was wrong on prod: a laptop was posting into the
production project and was indistinguishable from it.

Two things combined to allow that. The DSN lives in log4j2.xml, which ships inside
every build, so any machine running this code can report. And the Sentry SDK
defaults `environment` to "production" when it is not set -- which it never was --
so local runs arrived pre-labelled as prod.

Adds sentry.properties to each module, read off the classpath by the SDK itself
(io.sentry.config.PropertiesProviderFactory) and merged over the appender's config.
Both keys used here are honoured by io.sentry.ExternalOptions in 7.22.6 (verified
against the jar): `enabled` and `environment`.

The COMMITTED values are the safe ones -- enabled=false, environment=dev -- so a
plain local build is silent. build.gradle rewrites both from -Penv= alongside the
env.property it already writes, so only a deliberate -Penv=staging|prod build
reports, and it carries the right environment tag. tasks.build.doLast restores the
safe default afterwards, mirroring the existing handling of env.property.

Verified both directions: default build leaves enabled=false/environment=dev,
-Penv=prod yields enabled=true/environment=prod.

Note this makes the board trustworthy rather than merely quieter: events can now be
filtered on environment, and anything unlabelled is a build that predates this.
 
/trunk/profitmandi-cron/src/main/resources/sentry.properties
/trunk/profitmandi-fofo/src/main/resources/sentry.properties
/trunk/profitmandi-web/src/main/resources/sentry.properties
/trunk/profitmandi-cron/build.gradle
/trunk/profitmandi-fofo/build.gradle
/trunk/profitmandi-web/build.gradle
37491 36 d 18 h amit /trunk/ errors: ship ERROR events to GlitchTip via the log4j2 Sentry appender

io.sentry:sentry-log4j2:7.22.6 in all three deployables. Pinned to 7.x because
8.x drops Java 8; verified class major version 52.

minimumEventLevel=ERROR is load-bearing. It only became safe after r37490 moved
business validations to WARN -- 32% of the ERROR stream was HTTP 400s where the
user is simply told what to fix, and sending those would have made "insufficient
balance" the top issue and buried real bugs. Breadcrumbs come from INFO so an
issue arrives with the log lines that preceded it.

Attached to the application loggers only; framework noise is not our bug.

web's log4j2.xml is committed here. cron's and fofo's are held back: both carry
uncommitted local development paths (a user.home expansion, and an absolute
/Users path) that would break production logging and the Alloy log tailing.
Their Sentry blocks are staged locally and should land with whoever owns those
path edits.
 
/trunk/profitmandi-cron/build.gradle
/trunk/profitmandi-fofo/build.gradle
/trunk/profitmandi-web/build.gradle
/trunk/profitmandi-web/src/main/resources/log4j2.xml
36418 162 d 12 h amit /trunk/profitmandi-web/ OkHttp→Apache HttpClient migration. HyperTrackController/TrackingController now use RestClient, DB reads extracted to HyperTrackService to release connections before external HTTP calls. V2FofoDigifyController uses HttpClientFactory.  
/trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/controller/HyperTrackService.java
/trunk/profitmandi-web/build.gradle
/trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/controller/HyperTrackController.java
/trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/controller/TrackingController.java
/trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/v2/controller/fofo/V2FofoDigifyController.java
35599 253 d 9 h amit /trunk/profitmandi-web/ Add HikariCP dependency for connection pooling  
/trunk/profitmandi-web/build.gradle
35389 296 d 14 h amit /trunk/profitmandi-web/ donot commit  
/trunk/profitmandi-web/build.gradle
27028 2219 d 10 h tejbeer /trunk/profitmandi-web/ change  
/trunk/profitmandi-web/src/main/resources/sms.vm
/trunk/profitmandi-web/build.gradle
/trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/config/AppConfig.java
/trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/controller/StoreController.java
26217 2453 d 18 h amit.gupta /trunk/  
/trunk/profitmandi-common/build.gradle
/trunk/profitmandi-web/build.gradle
23947 2996 d 17 h tejbeer /trunk/ date changes  
/trunk/profitmandi-dao/src/main/java/com/spice/profitmandi/dao/entity/transaction/AddWalletRequest.java
/trunk/profitmandi-web/build.gradle
/trunk/profitmandi-web/src/main/java/com/spice/profitmandi/web/config/WebMVCConfig.java
23704 3056 d 14 h amit.gupta /trunk/profitmandi-web/  
/trunk/profitmandi-web/build.gradle
23693 3057 d 19 h tejbeer /trunk/profitmandi-web/ dependnecy change  
/trunk/profitmandi-web/build.gradle
22874 3254 d 18 h ashik.ali /trunk/profitmandi-web/  
/trunk/profitmandi-web/build.gradle
22531 3290 d 19 h ashik.ali /trunk/profitmandi-web/  
/trunk/profitmandi-web/build.gradle
/trunk/profitmandi-web/src/main/resources/META-INF/env.property
22427 3312 d 13 h ashik.ali /trunk/profitmandi-web/  
/trunk/profitmandi-web/build.gradle
/trunk/profitmandi-web/deploy.sh
/trunk/profitmandi-web/deployG.sh
/trunk/profitmandi-web/settings.gradle