Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analytics: Create Collectors Layer #29712

Closed
Tracked by #29476 ...
jdotcms opened this issue Aug 22, 2024 · 5 comments · Fixed by #29791
Closed
Tracked by #29476 ...

Analytics: Create Collectors Layer #29712

jdotcms opened this issue Aug 22, 2024 · 5 comments · Fixed by #29791

Comments

@jdotcms
Copy link
Contributor

jdotcms commented Aug 22, 2024

Parent Issue

#29476

User Story

As part of the Analytics infrastructure; we need to create a collectors layer
We can think on two kind collectors:

  1. syn collectors; which are in charge of collect information from the request, session, app and so on but in the same request thread scope
  2. async collectors; which are in charge of collect information from session, app and so on but in a separated thread, the intention behind this is to avoid to delay the current request thread execution by doing cpu times by gathering information
    In addition the clients might add collectors programatically by OSGI

Acceptance Criteria

We need to create a collector to gather information for the following events:

  • PAGE_REQUEST: Triggered when a page is accessed.

  • FILE_REQUEST: Triggered when any file is accessed. If a page is accessed and requests a file (e.g., an image, JS, CSS, etc.), two events will be triggered: one for the page as a PAGE_REQUEST and another for each file as a FILE_REQUEST. Files can be loaded using the following endpoints:

    • /dA/... Endpoint. More info here.
    • /contentAsset Endpoint. More info here.
    • /dotAsset Endpoint. More info here.
    • By directly using the file's URI in the URL.
  • URL_MAP: Triggered when a URL map is used. In this case, two events are triggered: one for the URL_MAP and another for PAGE_REQUEST (the second one corresponds to the detailed page request).

  • VANITY_REQUEST: Triggered when a vanity URL is used. If the vanity URL forwards internally, two events will be triggered: the first one as a VANITY_REQUEST, and the second one could be either a FILE_REQUEST or a PAGE_REQUEST, depending on the forward destination.

Proposed Objective

Core Features

Proposed Priority

Priority 3 - Average

External Links... Slack Conversations, Support Tickets, Figma Designs, etc.

No response

Assumptions & Initiation Needs

No response

Quality Assurance Notes & Workarounds

No response

Sub-Tasks & Estimates

No response

@wezell
Copy link
Contributor

wezell commented Aug 22, 2024

Just to be clear, we have these already. See:

https://github.com/dotCMS/core/tree/master/dotCMS/src/main/java/com/dotcms/visitor/filter/characteristics

These build a map of information from the request based on the user, session, etc.

@jdotcms
Copy link
Contributor Author

jdotcms commented Sep 18, 2024

PR

@freddyDOTCMS
Copy link
Contributor

freddyDOTCMS commented Sep 18, 2024

Note to QA: it is better test this issue together with #29862, if you want to test it alone then you are going to need to run the query directly in Clickhouse doing together allow you to run the query using CubeJS instead.

Steps to test (both issues together):

  • Start dotCMS with the full starter
  • Start Analytics to this just: Go to ""/core/docker/docker-compose-examples/analytics"" and run the command "docker-compose up", and wait a couple of minutes, Configure the Analitycs App in dotCMS with the follow parameters:

ClientIId: analytics-customer-customer1
Client Secret: testsecret
Analytics Config URL http://localhost:8088/c/customer1/cluster1/keys
Analytics Write URL http://localhost:8081/api/v1/event
Analytics Read URL http://localhost:4001/

@freddyDOTCMS
Copy link
Contributor

freddyDOTCMS commented Sep 27, 2024

Pass Internal QA: The CA data for PAGE, FILE, URL MAP and Vanity URL are been collecting as expected

We just have some problems collecting the referer, user-agent and persona field but we already work on this in another issue:

@freddyDOTCMS freddyDOTCMS removed their assignment Sep 27, 2024
@dsilvam dsilvam closed this as completed Oct 2, 2024
@josemejias11
Copy link
Contributor

Approved: Tested on trunk_a12617a, Docker, macOS 14.5, FF v126.0.1

Screenshot 2024-10-04 at 8 40 45 AM

@josemejias11 josemejias11 added Release : 24.10.08 Bug Fixing and removed Triage labels Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

7 participants