Skip to main content

📚 Appendix

Glossary​

TermDefinition
Trace FlagSalesforce setting enabling debug logging for a user or class over a period. Created via Tooling API.
Trace JobManaged trace job in Apexium that auto-renews trace flags using a sliding window before the 24-hour expiry.
Debug LogGenerated log file with debug statements and system events. Stored in Salesforce for 24h, in Apexium for 15+ days.
Debug LevelConfiguration controlling which events are logged (e.g., DB, FINEST, PROFILING).
Apex ClassCompiled Apex code unit in Salesforce. Tracked by Apexium for metadata changes.
Apex TriggerApex code that runs before/after DML events. Tracked by Apexium for metadata changes.
CoveragePercentage of Apex code executed by tests. Viewed via Apexium's coverage reports.
MetadataApex classes, triggers, reports, debug levels, and other Salesforce configuration objects.
Connected AppSalesforce app configured with OAuth 2.0 (Client Credentials flow) for API access.
MinIOS3-compatible object storage used by Apexium for log bodies and metadata snapshots.
Org ContextMulti-org management — Apexium tracks which Salesforce org is currently active.

Troubleshooting​

Authentication​

ErrorCauseFix
INVALID_SESSION_IDToken expired or invalidRun ./apexium init to re-authenticate
unauthorized_urlWrong instance URLCheck SALESFORCE_INSTANCE_ORG in .env
invalid_clientBad credentialsVerify Consumer Key/Secret in Connected App

Logs​

IssueCauseFix
No logs appearingNo trace flag activeCreate a trace job: POST /api/sfdc/logs/trace-jobs
Logs not storingMinIO not runningCheck docker compose ps, restart if needed
Old logs missingRetention cleanup ranDefault is 15 days, adjust log.retention.days

Metadata​

IssueCauseFix
Changes not detectedPolling intervalMetadata polls every 6 hours, wait or restart
No classes showingNot synced yetWait for next metadata poll cycle
Diff not availableNo history recordedChanges only tracked after Apexium starts polling

Infrastructure​

IssueCauseFix
Backend won't startPort 8080 in useStop conflicting service or change port
PostgreSQL connection refusedDB not healthydocker compose restart db, check logs
Redis connection refusedRedis not runningdocker compose restart redis
MinIO bucket missingFirst runBucket created automatically on startup

FAQ​

General​

Q: Can I use it without the web UI? A: Yes. The backend REST API is fully functional. Use curl or any HTTP client.

Q: How long are logs stored? A: 15 days by default. Configurable via log.retention.days in .env.

Q: Is it free? A: Yes. MIT licensed open source.

Q: Which Salesforce editions are supported? A: Any edition with API access (Developer, Enterprise, Unlimited). Professional Edition requires API add-on.

Trace Flags​

Q: What happens when a trace flag expires? A: If managed by a Trace Job, it auto-renews before expiry. Manual flags expire and stop logging.

Q: Can I trace multiple users at once? A: Yes. Create separate trace jobs for each user.

Q: How long can I keep a trace flag active? A: Indefinitely with Trace Jobs — they use a sliding window to renew before the 24-hour limit.

Metadata​

Q: How often does Apexium check for changes? A: Every 6 hours by default. Configurable via metadata.poll.rate.

Q: Does it track all metadata types? A: Currently tracks Apex Classes, Apex Triggers, and Reports. More types planned.

Deployment​

Q: Can I run without Docker? A: Yes. Run PostgreSQL, Redis, and MinIO separately, then ./mvnw spring-boot:run.

Q: What's the minimum Java version? A: Java 21+. The Dockerfile uses Eclipse Temurin 25.

Q: Can I use an existing PostgreSQL instance? A: Yes. Set DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD in .env.

Useful Endpoints​

Quick reference for common operations:

# Health check
curl http://localhost:8080/actuator/health

# List logs from database
curl http://localhost:8080/api/sfdc/logs/db

# Create a trace job
curl -X POST http://localhost:8080/api/sfdc/logs/trace-jobs \
-H "Content-Type: application/json" \
-d '{"userId":"005...","startTime":"2026-09-15T09:00:00Z","endTime":"2026-09-15T17:00:00Z","logLevel":"DEBUG"}'

# Get metadata history
curl http://localhost:8080/api/sfdc/metadata/history/class/01p...

# Flush cache
curl -X POST http://localhost:8080/admin/cache/flush

# Swagger UI
open http://localhost:8080/swagger-ui.html

References​

ResourceLink
GitHub Repositorygithub.com/ichwansh03/apexium-log
Docker Hubhub.docker.com/r/ichwansh03/apexium-log-app
Salesforce Tooling APIdeveloper.salesforce.com/docs/atlas.en-us.api_tooling.meta
Salesforce REST APIdeveloper.salesforce.com/docs/atlas.en-us.api_rest.meta
Spring Boot Docsspring.io/projects/spring-boot
MinIO Docsmin.io/docs