dotCMS / dotCMS/core

Refactor dotCMS core analytics code

Open
#35,051 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

dotCMS : Analytics Priority : 4 Low Team : Falcon Type : Refactoring
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Description

Clean up dotCMS core as part of the migration to the new analytics microservice architecture. dotCMS now only proxies analytics requests to the microservice — the legacy endpoint and token management code are no longer needed.

Changes required:

  1. Remove old analytics endpointContentAnalyticsResource.java (line 60 and related methods)
  2. Remove token renewal codeAccessTokenRenewJob.java and all related scheduler registrations in DotInitScheduler
  3. Create Postman test — Add Postman collection tests for EventAnalyticsProxyResource to verify the proxy endpoint works end-to-end

This cleanup is a prerequisite to the new architecture where dotCMS only proxies requests to the microservice.

Parent epic: #35048

Acceptance Criteria

  • ContentAnalyticsResource.java legacy endpoint removed (entry point at line 60 and all associated logic)
  • AccessTokenRenewJob.java removed
  • All scheduler registrations for token renewal removed from DotInitScheduler
  • No compilation errors after removal — no dangling references
  • Postman test added for EventAnalyticsProxyResource covering: successful proxy to event manager, auth header forwarding, error passthrough
  • Code passes build (./mvnw install -pl :dotcms-core -DskipTests)

Additional Context

  • Source task: Task 26 (Core code refactoring) from the improvement plan
  • Related branch: issue-34849-Add-dotCMS-Analytics-Proxy-Endpoint-for-/v1/analytics/-to-dot-ca-event-manager
  • New proxy entry point: EventAnalyticsProxyResource.java

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ContentAnalyticsResource.java, AccessTokenRenewJob.java, DotInitScheduler, and EventAnalyticsProxyResource.java to trace the legacy endpoint, token-renewal registrations, and proxy behavior. Run ./mvnw install -pl :dotcms-core -DskipTests, then use the existing Postman setup to cover successful proxying, auth-header forwarding, and error passthrough. Done means the legacy code and dangling references are gone, the proxy tests exist, and the build passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, postman
Domain
api, backend, testing-qa
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.