fix: Multiple improvements - Frontend build, Mobile releases, DC error handling#94
Merged
fix: Multiple improvements - Frontend build, Mobile releases, DC error handling#94
Conversation
React Query v5 removed onError callback from useQuery options. Moved error handling inside queryFn using try-catch pattern. When /api/data times out or fails: - Catch the error silently - Log message for debugging - Return empty array (page works without ads) - No error state in React Query This maintains the graceful degradation behavior while fixing the build error.
- Created mobile-release.yml workflow with manual trigger - Accepts version number as input parameter - Builds iOS and Android apps using build-saucelabs.sh - Creates GitHub release on origin repository - Commits version changes back to main branch - Uploads build artifacts with 90-day retention Updated build-saucelabs.sh: - Now respects GITHUB_REPO environment variable - Prefers origin remote over fork for auto-detection - Ensures releases are pushed to origin (splunk/opentelemetry-demo) Usage: 1. Go to Actions tab in GitHub 2. Select 'Mobile App Release' workflow 3. Click 'Run workflow' 4. Enter version number (e.g., 1.2.3) 5. Wait for build to complete (~15-20 minutes) 6. Release will be created at github.com/splunk/opentelemetry-demo/releases
Changes: - Script now uses GITHUB_REPOSITORY env var (automatically set by GitHub Actions) - When running locally, auto-detects from 'origin' remote - If running on fork: release goes to fork - If running on origin: release goes to origin - No manual configuration needed How it works: 1. GitHub Actions: GITHUB_REPOSITORY = repo where workflow runs 2. Local execution: Detects from 'origin' remote URL 3. Result: Release always goes to the correct repository Examples: - Run workflow on hagen-p/opentelemetry-demo-splunk → release goes to fork - Run workflow on splunk/opentelemetry-demo → release goes to origin - Run locally from fork clone → release goes to fork - Run locally from origin clone → release goes to origin
Created new splunk-astronomy-shop-1.5.0-values.yaml with DC error fix.
Left 1.4.0 unchanged for backward compatibility.
Changes in v1.5.0:
- Added transform/dc_not_error processor
- Treats 'DC' (Downstream Connection closed) as normal user behavior
- Sets status.code to STATUS_CODE_UNSET for DC errors
- Sets error attribute to 'false' for DC errors
- Added processor to traces pipeline after filter/drop_flagd
Usage:
helm upgrade astronomy-shop <chart> \
-f kubernetes/splunk-astronomy-shop-1.5.0-values.yaml
Impact:
- User navigation no longer counted as errors in APM
- Error rates reflect actual application issues
- DC flag still present in spans for debugging
Extended transform/dc_not_error processor to handle both sides: Ingress (Client → Proxy): - ✅ Already fixed: response_flags='DC' → error='false' Egress (Proxy → Frontend): - ✅ Now fixed: canceled='true' → error='false' Problem: When a client disconnects (DC on ingress), Envoy also cancels the outbound request to the backend. This created TWO errors per request: 1. Ingress DC error (now fixed) 2. Egress cancellation error (now fixed) Solution: Added handling for canceled='true' attribute on egress spans. Now both ingress AND egress are treated as normal user behavior. Impact: - Eliminates ALL errors from user navigation events - Error rates now reflect only real application issues - Both DC and canceled flags still visible for debugging
Updated transform processor to rename spans for better visibility: Before: - ingress (error=true, response_flags='DC') - router frontend egress (error=true, canceled=true) After: - ingress (user navigated away) (error=false, response_flags='DC') - router frontend egress (backend interaction terminated - client disconnect) (error=false, canceled=true) Benefits: - ✅ Clear what happened at a glance - ✅ No longer counted as errors - ✅ All diagnostic info preserved (response_flags, canceled attributes) - ✅ Easy to distinguish from real errors - ✅ Better UX in APM trace view The renamed spans clearly indicate this is normal user behavior, not an application error requiring investigation.
Changed from: 'backend interaction terminated - client disconnect' To: 'backend interaction terminated due to client disconnect' Clearer causal relationship in the span name.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR includes several improvements and fixes:
Changes
1. Frontend Build Fix
Problem: Build failing with TypeScript error -
onErrorcallback removed in React Query v5Solution: Replaced deprecated
onErrorcallback with try-catch pattern inqueryFnFiles:
src/frontend/providers/Ad.provider.tsx2. Mobile Release Automation
Added: GitHub Actions workflow for building and releasing mobile apps
Features:
Files:
.github/workflows/mobile-release.yml(new)build-saucelabs.sh(updated for auto-detection)3. DC Error Handling (v1.5.0 Collector Config)
Problem: User navigation causing error alerts in APM
Solution: New OTel Collector transform processor
ingress (user navigated away)router frontend egress (backend interaction terminated due to client disconnect)Files:
kubernetes/splunk-astronomy-shop-1.5.0-values.yaml(new)Impact:
Testing
Frontend Build
Mobile Release Action
Collector DC Handling
Deployment Notes
Frontend
Deploy as normal - fix is backward compatible
Mobile Releases
Use GitHub Actions UI:
Collector Config
Deploy v1.5.0 config:
Leave v1.4.0 unchanged for backward compatibility.
Breaking Changes
None - all changes are backward compatible
Related Issues