Skip to content

feat(scrapeURL/index): index metrics#2160

Merged
mogery merged 2 commits intomainfrom
mogery/eng-3555-add-index-logs-set-up-gcp-distribution
Sep 15, 2025
Merged

feat(scrapeURL/index): index metrics#2160
mogery merged 2 commits intomainfrom
mogery/eng-3555-add-index-logs-set-up-gcp-distribution

Conversation

@mogery
Copy link
Copy Markdown
Member

@mogery mogery commented Sep 15, 2025

Summary by cubic

Add debug metrics for index hits and misses in scrapeURLWithIndex to improve observability and help tune maxAge. Supports ENG-3555 by adding structured index logs for GCP distribution analysis.

  • New Features

    • Logs index metrics on hit/miss via meta.logger.debug with module: "index/metrics".
    • Fields: hit (bool), age (ms, on hit), maxAge, dynamicMaxAge.
  • Refactors

    • Removed unused imports (addDomainFrequencyJob, storage).

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Prompt for AI agents (all 1 issues)

Understand the root cause of the following 1 issues and fix them.


<file name="apps/api/src/scraper/scrapeURL/engines/index/index.ts">

<violation number="1" location="apps/api/src/scraper/scrapeURL/engines/index/index.ts:343">
Age metric sign is inverted; use now - created_at to report a positive age.</violation>
</file>

React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai to give feedback, ask questions, or re-run the review.

Comment thread apps/api/src/scraper/scrapeURL/engines/index/index.ts Outdated
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@mogery mogery merged commit 3c3d382 into main Sep 15, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant