dotCMS / core

Headless/Hybrid Content Management System for Enterprises
http://dotcms.com
Other
865 stars 467 forks source link

Store Metrics data for API Hits #27178

Open freddyDOTCMS opened 10 months ago

freddyDOTCMS commented 10 months ago

Parent Issue

No response

User Story

We need to storage how many time several API End point are been hit and store them every 30 minutes or so in a temporally table.

Also we ned to implement a Util Method to take the data from this temporally table and create a JSON document with the summary.

Later this JSON is going to be taken by the Metric Job to be persist but this part is beyond the scope of this issue

The Metric Job is going to be implemented here https://github.com/dotCMS/core/issues/25888

Acceptance Criteria

Collect the API hit for the follow API on a postgres temporally table

Proposed Objective

Core Features

Proposed Priority

Priority 2 - Important

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

dsilvam commented 7 months ago

PR: https://github.com/dotCMS/com.dotcms.telemetry/pull/37

dsilvam commented 7 months ago

Needs work: This is intercepting the ES searches and not Site searches. We can still use this work though to intercept calls to the Image API (/contentAsset/image/).

dsilvam commented 6 months ago

PR: https://github.com/dotCMS/com.dotcms.telemetry/pull/45

freddyDOTCMS commented 6 months ago

Note to IQA:

Recommended values to test:

Env variables:

Also set the Cache Expire Values to 2 minutes here:

https://github.com/dotCMS/com.dotcms.telemetry/pull/45/files#diff-cb7a924a691babc5ad2ebd0cd1c577cca5a479b9d5bd85a4f5b874dbcc46d44dR15

dsilvam commented 6 months ago

Passed Internal QA: All the new 4 metrics are working as expected.