feat(cdn-logs-report): add daily agentic traffic mapping for allowlisted site#1978
Draft
akshaymagapu wants to merge 3 commits intomainfrom
Draft
feat(cdn-logs-report): add daily agentic traffic mapping for allowlisted site#1978akshaymagapu wants to merge 3 commits intomainfrom
akshaymagapu wants to merge 3 commits intomainfrom
Conversation
|
This PR will trigger a minor release when merged. |
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
Add a site-specific daily
agentic_trafficexport path forcdn-logs-reportwhile keeping existing weekly report generation unchanged.This implements daily processing only for allowlisted site ID:
9ae8877a-bbf3-407d-9adb-d6a72ce3c5e3What Changed
Added daily SQL query template:
src/cdn-logs-report/sql/agentic-traffic-daily-report.sql<10 hits => Otherbucketing)Added daily query builder support:
src/cdn-logs-report/utils/query-builder.jscreateAgenticDailyReportQuery()now filters exact single day (year/month/day)Added mapper for target
agentic_trafficpayload:src/cdn-logs-report/utils/agentic-traffic-mapper.jsdimensionscontent_typeclassification toXML | PDF | HTML | TXT | OTHERAdded shared provider inference helper:
src/common/user-agent-classification.jsinferProviderFromUserAgent()reused by mapper forplatformExtended handler with daily branch:
src/cdn-logs-report/handler.jsTests
Added new mapper tests:
test/audits/cdn-logs-report/agentic-traffic-mapper.test.jsUpdated existing tests:
test/audits/cdn-logs-report/query-builder.test.jstest/audits/cdn-logs-report/handler.test.jsVerified locally (targeted):
npx mocha -i -g 'Post-Deploy' --spec=test/audits/cdn-logs-report/agentic-traffic-mapper.test.js --spec=test/audits/cdn-logs-report/query-builder.test.js --spec=test/audits/cdn-logs-report/handler.test.jsFollow-ups (TODO)
category_idonce category API is available